A deep reinforcement learning approach forecasts and prevents potential plasma instabilities that currently limit the potential of fusion energy.