When a seasoned astrophysicist teams up with an AI code generator, the boundary between human ingenuity and machine intelligence blurs.

Chi‑kwan Chan, a researcher at the University of Arizona’s Steward Observatory, announced in 2026 that he had leveraged OpenAI’s Codex language model to create new algorithms for simulating the plasma that swirls around super‑massive black holes. His work is part of the larger effort by the Event Horizon Telescope (EHT) collaboration to transform the 2019 image of M87’s black hole into a full‑blown video.

Black holes are regions of space where gravity is so intense that even light cannot escape once it crosses the event horizon. Because the interior is invisible, scientists focus on the luminous plasma that orbits just outside. This hot, electrically charged gas consists of electrons and ions whose motions are dictated by Einstein’s general theory of relativity and the laws of electromagnetism.

Simulating such an environment is notoriously difficult. In dense plasma, frequent particle collisions allow the gas to be treated as a fluid, and well‑established equations can be applied. Near a super‑massive black hole, however, the plasma is hot and sparse. Collisions are rare, and particles follow magnetic field lines in long, spiraling paths. Accurately capturing this behavior requires tracking the trajectory of trillions of particles, which forces simulations to use extremely small time steps. Even the fastest supercomputers spend most of their cycles calculating these minute motions, limiting the size and fidelity of the models.

Chan has long suspected that mathematical tricks could cut down the computational load. “If we could change the way the simulation tracks particle motion, the computer wouldn’t have to follow every tiny spiral directly,” he said. “Exploring all the mathematical possibilities by hand would have taken an enormous amount of time.”

To accelerate the search, Chan turned to Codex. The model produced a slew of candidate algorithms—some incorrect, many worth testing. “Most scientific ideas fail,” Chan noted. “What matters is that these algorithms are testable. Once you find one that works, it can potentially unlock simulations that were previously impossible.”

Unlike some AI systems that offer answers without showing their reasoning, Chan’s team uses Codex to generate explicit numerical schemes that they can scrutinize, implement, and verify against known solutions. This approach preserves the scientific rigor required for high‑stakes physics research.

The EHT collaboration, which released the first black‑hole image in 2019, is now amassing more data in hopes of producing the first video of a super‑massive black hole. The project relies on petabytes of data and complex processing pipelines. Enhanced simulation tools could help interpret the observations and test general relativity in the strong‑gravity regime.

If the new algorithms succeed, they could enable simulations that track trillions of particles around a black hole, offering insights into plasma dynamics that have eluded researchers for decades. The work also exemplifies a broader trend of using large language models as research assistants across scientific fields.

Chan stresses that AI is a tool, not a replacement for human judgment. “We don’t accept an idea because it came from Einstein, from a bright student, or from an AI model,” he said. “We accept it only after repeated testing.”

The project is ongoing. Chan and his colleagues continue to refine the Codex‑generated algorithms and benchmark them against established simulation results. The outcome could influence future computational strategies for studying extreme astrophysical environments and may have implications for other areas of high‑performance computing.

In sum, the collaboration between a seasoned astrophysicist and an AI coding assistant marks a concrete step toward more efficient and accurate black‑hole plasma simulations. The work is part of the larger mission to turn static images of black holes into dynamic videos and to push the limits of Einstein’s theory of gravity.