Designing invisibility cloaks has always been one of the most fascinating fields of research; in this regard, metasurface-based carpet cloaks have drawn researchers’ attention due to their inherent tenuousness, resulting in a lower loss and easier fabrication. However, their performances are dependent on the incident angle of the coming wave; as a result, designing a carpet cloak capable of rendering objects under it invisible for a wide range of angles requires advanced methods. In this paper, using the Particle Swarm Optimization (PSO) algorithm, along with a trained neural network, a metasurface-based carpet cloak is developed capable to operate for a wide range of incident angles. The deep neural network is trained and used in order to accelerate the process of calculation of reflection phases provided by different unit cell designs. The resultant carpet cloak is numerically analyzed, and its response is presented and discussed. Both near-field and far-field results show that the designed carpet cloak operates very well for all incident angles in the range of 0 to 65 degrees.