Bagel-shaped fusion reactors called tokamaks produce energy of the kind that powers the sun. But massive disruptions can halt fusion reactions and damage the reactors. Princeton University researchers’ Fusion Recurrent Neural Network (FRNN) code harnesses an artificial-intelligence tool called deep-learning to predict disruptive events. Researchers can also use the code to make predictions that could open avenues for active reactor control and optimization. The method, reported in Nature, holds promise for enabling steady-state operation of tokamaks.