Optimization and Prediction of Spectral Response of Metasurfaces Using Artificial Intelligence