Intelligent Beam Steering for Wireless Communication Using Programmable Metasurfaces