Breaking the Millisecond Barrier: Princeton Researchers Deploy AI Framework PACMAN to Master Nuclear Fusion Stability

Nuclear fusion has long held the status of the holy grail of clean energy production, promising an abundant, near-limitless supply of electricity without the long-lived radioactive waste or catastrophic meltouts associated with traditional nuclear fission. Yet, harnessing the power of the sun and stars inside a laboratory setting on Earth requires controlling a superheated state of matter that inherently defies containment. Inside confinement devices known as tokamaks, plasma—an electrically charged gas heated to temperatures exceeding the core of our sun—must be maintained in a delicate balance of extreme heat, density, and stability.

However, this plasma can become violently unstable within a few thousandths of a second. These rapid fluctuations move far too quickly for human operators, whose reaction times are measured in seconds, to effectively manage. To bridge this critical operational gap, researchers at the U.S. Department of Energy’s (DOE) Princeton Plasma Physics Laboratory (PPPL) and Princeton University have engineered a groundbreaking software framework called PACMAN—short for Prediction And Control using MAchiNe learning. Designed to orchestrate multiple artificial intelligence models simultaneously, PACMAN operates at blistering speeds, making crucial stabilization decisions every 20 milliseconds while enforcing strict hardware safety boundaries and leaving ultimate strategic objectives in human hands.

The details of PACMAN’s design and its successful deployment across five separate real-world fusion experiments were recently published in the peer-reviewed journal Nuclear Fusion, marking a monumental shift in how researchers approach the real-time control of experimental reactors.

The Millisecond Challenge of Magnetic Confinement Fusion

To understand the magnitude of the achievement represented by PACMAN, one must examine the extreme physics of magnetic confinement fusion. Tokamaks are toroidal, or doughnut-shaped, chambers that utilize immensely powerful magnetic fields to suspend and isolate plasma away from the interior walls of the vessel. If the plasma touches the vessel walls, it cools instantly, damaging the machinery and halting the reaction.

For a fusion reaction to generate more energy than it consumes, the plasma must remain continuously hot, dense, and stable. Yet, the plasma is a dynamic, highly chaotic medium. Even minor disturbances or localized instabilities can cascade through the system within milliseconds, abruptly terminating the reaction in what researchers term a disruption.

Historically, predicting these plasma behaviors has posed a formidable computational bottleneck. Advanced physics-based computer simulations can accurately model plasma dynamics, but these calculations are notoriously resource-intensive, often requiring days or even months of supercomputer time to complete. While invaluable for post-experiment analysis and long-term reactor design, these legacy simulations are entirely useless for guiding an active experiment in real time, especially given that many experimental tokamak runs last only a few minutes.

"That’s great for preparing for the next experiment in a year, but for control we need models that make a decision in the moment," explained Hiro Farre Kaga, a graduate student in the Princeton Program in Plasma Physics—a joint academic initiative between Princeton University and PPPL—and co-lead author of the study. "Machine learning models can describe the plasma behavior very well, and importantly, they are the only way we have to model the plasma in millisecond times. The speed of these models is what’s key for control."

The Architecture of PACMAN: Unifying Fragmented AI

Prior to the development of PACMAN, the application of machine learning to fusion energy was largely fragmented. While individual AI models had demonstrated success in controlling specific aspects of plasma behavior—such as regulating temperature or mitigating localized tearing modes—these models were typically developed in isolation. They lacked a standardized, interoperable framework that allowed different algorithms to share data and communicate seamlessly within a single operating system.

A modern tokamak is an extraordinarily complex ecosystem requiring simultaneous monitoring and adjustment of diverse subsystems, including high-powered heating equipment, magnetic coils, and gas fuel injectors. To achieve comprehensive control, researchers needed an integrative architecture capable of harmonizing multiple specialized AI routines.

PACMAN was engineered specifically to fill this void. "We developed this framework so that models could communicate, outputs from those models could be shared and we could do exciting physics in one integrated system," noted Andy Rothstein, a graduate student in Princeton University’s Department of Mechanical and Aerospace Engineering and co-lead author of the research paper.

Operating as a continuous, high-speed control loop, PACMAN executes its monitoring and decision-making cycle roughly 50 times every second. "A really focused human operator can respond on the order of seconds," Rothstein observed. "The whole PACMAN framework typically runs in about 20 milliseconds, and it’s not running once. It’s running again and again and again. It can see small things happening in the plasma and adjust in a way that a human would never be able to do."

Step-by-Step Mechanics: How the Framework Controls a Tokamak

PACMAN’s operational workflow mirrors a highly optimized, automated industrial assembly line divided into four distinct stations:

  1. Data Acquisition and Ingestion: The framework begins by harvesting live telemetry data streams from the tokamak sensors. This includes real-time metrics on plasma temperature, density, and magnetic field fluctuations.
  2. Error Checking and Data Packaging: Incoming sensor readings are immediately vetted for anomalies or hardware errors, sanitized, and compiled into a unified, synchronized data package.
  3. AI Estimation and Predictive Control: Specialized machine learning models pull the metrics they require from the package. They analyze the current state of the plasma and forecast its likely trajectory over the immediate future. Based on these forecasts, algorithmic controllers determine what corrective actions are required—such as dynamically ramping up the power of a neutral beam injector.
  4. Conflict Resolution and Safety Enforcement: In the final stage, PACMAN arbitrates any competing instructions issued by different controllers. Crucially, the system checks all proposed commands against hard-coded hardware safety limits before dispatching the final, vetted instructions to the tokamak’s physical actuators.

Because PACMAN’s internal components operate as independent modules, research scientists can introduce, update, or remove individual AI models without destabilizing the broader framework.

Real-World Validation at the DIII-D National Fusion Facility

To test the resilience, flexibility, and efficacy of their new software, the Princeton and PPPL research team took PACMAN out of the computer lab and onto the floor of the DOE’s DIII-D National Fusion Facility, a premier tokamak reactor located in San Diego, California, operated by General Atomics.

During a series of five distinct experimental runs, PACMAN was tasked with managing complex plasma scenarios that routinely confound conventional control systems. One of the most significant demonstrations involved the suppression of tearing modes—a type of magnetic instability that degrades confinement and can trigger a complete plasma disruption.

Traditional control mechanisms are reactive; they cannot identify a tearing mode until it has already manifested within the plasma, forcing controllers to scramble for a remedy. "Then they try to suppress it, and that can come with a lot of performance degradation," Farre Kaga explained. In contrast, PACMAN’s machine learning models leveraged real-time data to forecast the emergence of a tearing mode approximately 200 milliseconds before it occurred. This predictive capability allowed the system to preemptively alter the plasma profile, completely averting the instability before it could damage the reaction.

In another notable experiment, PACMAN successfully coordinated all six of DIII-D’s gyrotrons simultaneously. Gyrotrons are high-frequency sources that inject powerful microwave beams into the plasma to heat it to fusion-relevant temperatures. To hit complex performance targets pre-selected by the research team, PACMAN dynamically adjusted the power output of the gyrotrons while continuously repositioning their internal mirrors in real time.

"There was no algorithm to find that optimal solution before," Farre Kaga stated. "When the shot ended and we looked at the data, it was doing exactly what we hoped, simultaneously moving all six in an optimal way to reach the goal."

Accelerating Scientific Iteration and Maintaining Human Oversight

Beyond its immediate technical successes in plasma stabilization, PACMAN delivered an unexpected operational benefit: a drastic reduction in the time required to integrate new machine learning components into an active experimental reactor.

Building the initial PACMAN framework and successfully integrating its first operational model required months of painstaking collaborative engineering. However, when researchers sought to introduce a second, distinct AI model into the system, the timeline shrank dramatically.

"Then we went to put in the second model, and it took a couple of days. The testing was easier, and there were far fewer bugs," Rothstein said. "DIII-D is first and foremost a research machine, and sometimes things don’t work out the way you expected. If you can put a model on in a week, you can retrain it and put a new one on the week after. It allows for iteration that wasn’t possible previously."

Despite the heavy reliance on advanced artificial intelligence, the research team is careful to emphasize that PACMAN is designed to augment human scientific inquiry, not replace it. The framework functions under strict hierarchical guardrails: hardware safety limits are hard-coded into the system and cannot be overridden by any AI model, regardless of its predictive confidence. Furthermore, human physicists analyze the vast telemetry data generated after every experimental shot, using those insights to refine and tune the controllers before the next test cycle begins.

"No matter how sophisticated your controllers, in the end it’s a human operator that sets the parameters for that control," Farre Kaga emphasized.

Broader Implications for the Global Fusion Industry

As the global race toward commercializing fusion energy accelerates—spurred by private venture investments, international public-private partnerships, and governmental initiatives like the DOE’s Milestone-Based Fusion Development Program—the need for robust, standardized operational infrastructure has never been more urgent.

The modular architecture engineered into PACMAN positions the framework as a versatile platform that extends far beyond the DIII-D facility in San Diego. Its developers argue that the software can be readily adapted to tokamaks of varying geometrical scales, magnetic configurations, and diagnostic suites, including next-generation commercial pilot plants that currently exist only on paper.

"PACMAN uses a flexible setup where building-block AI algorithms can be put together. You can add a new one, swap one out or run several at once without touching the rest of the system," said Egemen Kolemen, associate professor of mechanical and aerospace engineering at Princeton University, who holds a joint appointment with the Andlinger Center for Energy and the Environment and PPPL. "That modularity is what turns AI plasma control from a series of one-off demonstrations into infrastructure the whole fusion community can build on."

By transforming isolated machine learning experiments into a cohesive, standardized software ecosystem, the Princeton research team has provided the global fusion community with a vital tool. As reactors grow larger, hotter, and more complex in the decades ahead, frameworks like PACMAN will likely form the invisible digital nervous system ensuring that confined stellar energy remains stable, safe, and ultimately harnessed for humanity’s power grid.


Research documentation and authorship credentials for the published study in Nuclear Fusion indicate contributions from a broad international and interinstitutional team. Additional authors include Ricardo Shousha, Keith Erickson, and SangKyeun Kim from the Princeton Plasma Physics Laboratory; Jalal-ud-din Butt, Peter Steiner, and Azarakhsh Jalalvand from Princeton University; and Takuma Wakatsuki from Japan’s National Institutes for Quantum Science and Technology.

The underlying research received financial backing from the U.S. Department of Energy Office of Science, operating under awards associated with the DIII-D National Fusion Facility (including DE-FC02-04ER54698, DE-SC0015480, and DE-AC02-09CH11466), alongside supplemental support from the National Science Foundation Graduate Research Fellowship under grant DGE-2039656.