  Electromagnetic environments are becoming increasingly complex and congested,
creating a growing challenge for systems that rely on electromagnetic waves for
communication, sensing, or imaging. The use of intelligent, reconfigurable
metasurfaces provides a potential means for achieving a radio environment that
is capable of directing propagating waves to optimize wireless channels
on-demand, ensuring reliable operation and protecting sensitive electronic
components. Here we introduce "deep wavefront shaping", a technique that
combines a deep learning network with a binary programmable metasurface to
shape waves in complex electromagnetic environments and to drive the system
towards a desired scattering response. We applied this technique to accurately
determine metasurface configurations based on measured system scattering
responses in a chaotic microwave cavity. The state of the metasurface that
realizes desired electromagnetic wave field distribution properties was
successfully determined even in cases previously unseen by the deep learning
algorithm. Our work represents an important step towards realizing intelligent
reconfigurable metasurfaces for smart radio environments that can ensure both
the integrity of electronic systems and optimum performance of wireless
networks.
