OpenAI Codex Powers Black Hole Simulation: 1000x Algorithm Speedup Brings First-Ever Black Hole Video Within Reach

OpenAI Codex accelerates black hole simulation algorithms 1000x, bringing the first black hole video within reach.
The Event Horizon Telescope team leveraged OpenAI Codex's agent mode to overcome a critical computational bottleneck in black hole plasma simulation. By autonomously generating, testing, and comparing numerical schemes, Codex found an algorithm 1000x faster than existing approaches — compressing ten days of manual iteration into minutes. This breakthrough paves the way for producing humanity's first-ever black hole video and exemplifies the transformative potential of AI in frontier scientific research.
From the First Black Hole Photo to the First Black Hole Video
In 2017, the Event Horizon Telescope (EHT) project made history — humanity captured its first-ever image of a black hole. Now, the same team is pushing toward an even more ambitious goal: producing the first-ever video of a black hole.
The Event Horizon Telescope is not a single telescope but a virtual array of millimeter-wave radio telescopes distributed around the globe. Using Very Long Baseline Interferometry (VLBI), it links telescopes separated by thousands of kilometers to function as a single super-telescope with an effective aperture nearly the size of Earth. In April 2017, the EHT observed the supermassive black hole at the center of the M87 galaxy. After two years of data processing, the first black hole image was released in 2019. The project involved collaboration among over 300 researchers and more than 60 institutions worldwide, with data volumes reaching the petabyte scale — requiring physical shipment of hard drives rather than network transfer.
However, the computational complexity of going from a static image to a dynamic video grows exponentially. Creating a black hole video demands not only greater computing power but also entirely new challenges along the time dimension. Static images can improve signal-to-noise ratios through long integration times, but video requires sufficient data quality at every time frame. On the observation side, the EHT needs more frequent observation windows and additional telescope sites (the next-generation ngEHT plans to expand to over 20 sites). On the simulation side, numerical solutions must maintain continuity and physical consistency across time series — any numerical instability in a single frame could distort the entire video.
The reason we can "see" a black hole is that extremely hot plasma emits intense radiation as it falls into the black hole. The black hole itself doesn't emit light, but its surrounding accretion disk — composed of gas and dust captured by gravity — heats up to billions of degrees due to extreme compression and friction, forming a fully ionized plasma state. These plasma particles spiral through the black hole's powerful magnetic field, emitting electromagnetic radiation across multiple wavelengths, from radio waves to X-rays. Simulating this process requires solving General Relativistic Magnetohydrodynamics (GRMHD) equations while also accounting for radiative transfer effects — the propagation paths of photons through curved spacetime. This is a classic multi-scale, multi-physics coupled problem with extremely high computational complexity. To accurately simulate plasma behavior around a black hole, one must track the trajectories of electrons and ions moving through magnetic fields — a problem that is nearly intractable under traditional computational frameworks.
CK, a member of the Event Horizon Telescope team (known among colleagues as the "black hole simulation expert"), demonstrated how they leveraged the OpenAI Codex agent to break through this computational bottleneck in one stroke.

Why Black Hole Research Matters So Much
Black holes fascinate physicists because they break our current understanding of physics. The surface of a black hole — the so-called "Event Horizon" — is a point of no return. Within the event horizon, spacetime curvature becomes so extreme that not even light can escape. According to the predictions of general relativity, the physics at the event horizon involves the intersection of gravity and quantum mechanics — one of the most profound unsolved mysteries in contemporary physics. Being able to observe the event horizon means we are touching the very edge of our understanding of the universe, and it provides a unique natural laboratory for testing the applicability of general relativity under extreme conditions.
In his interview, CK candidly shared: "We don't even know exactly what we're looking for. Even if you find something that's incorrect, it's still pushing the field forward." This spirit of open-ended exploration is the core driving force of fundamental scientific research.

The Stability Dilemma of Traditional Numerical Methods
The core challenge in simulating plasma around black holes lies in the stability of numerical computation. CK pointed out that standard numerical schemes are inherently unstable. This means that during long-duration simulations, computational errors continuously accumulate and amplify, eventually causing simulation results to severely distort or completely collapse.
Stability issues in numerical simulations stem from the discretization process of partial differential equations. When continuous physical equations are converted into discrete forms that computers can process, each computational step introduces truncation errors. In extreme physical environments like black hole simulations, plasma density and magnetic field strength can vary across more than a dozen orders of magnitude, making numerical schemes highly susceptible to non-physical solutions such as negative density or negative energy, which cause simulations to crash. Researchers typically face difficult trade-offs between accuracy, stability, and computational efficiency, employing techniques such as limiters, artificial dissipation, or Adaptive Mesh Refinement (AMR) to maintain simulation viability. Each of these techniques has its own pros and cons, and choosing the right combination often depends on years of accumulated experience and intuition.
The traditional approach involves researchers manually designing, testing, and iteratively refining different numerical algorithms. CK revealed that in the past, it took him a full ten days to try ten different algorithmic approaches — each requiring writing code, running tests, analyzing results, and then adjusting parameters to start over. This slow pace of manual iteration severely constrained research progress.

How the Codex Agent Accelerated Algorithm Iteration by 1000x
After introducing OpenAI Codex, the entire workflow underwent a qualitative leap. OpenAI Codex is a code generation and reasoning system based on large language models. Its agent mode allows the AI not only to generate code but also to autonomously plan tasks, execute code, analyze output, and perform iterative optimization. Unlike traditional code completion tools, the Codex agent can understand high-level scientific problem descriptions, decompose them into specific programming and evaluation tasks, and autonomously run and debug within a sandbox environment. This capability makes it particularly well-suited for algorithm exploration in scientific computing — researchers need only describe physical constraints and optimization objectives, and the AI can automatically search the solution space.
CK implemented a Codex agent skill that deeply involved the AI in the entire algorithm design and evaluation process:
- Problem Understanding: Codex first analyzes the essence and constraints of the simulation problem
- Evaluation Planning: Automatically plans evaluation metrics and establishes criteria for judging algorithm quality
- Batch Generation: Creates ten different numerical schemes at once
- Automated Comparison: Systematically evaluates and ranks the performance of each scheme
The most stunning result: the optimal algorithm found by Codex was 1000 times faster than the original approach. And all of this — from scheme generation to comparative evaluation — took only a few minutes, rather than the previous ten days.

A 1000x algorithm speedup represents a qualitative leap in scientific computing: simulations that previously required months on supercomputers can now be completed in hours, or simulation resolution can be increased by several orders of magnitude within the same timeframe. For black hole video, this means generating enough time frames to capture the dynamic evolution of plasma, rather than merely obtaining a snapshot of a single moment. Furthermore, faster algorithms allow researchers to conduct large-scale parameter sweeps, systematically exploring behavioral differences of black holes under various physical assumptions, opening entirely new possibilities for theoretical validation and new physics discoveries.
This is not merely an efficiency improvement — it represents a fundamental shift in the research paradigm. Codex makes "previously impossible simulations possible," freeing researchers from tedious algorithm tuning so they can focus their energy on the real physics questions.
The First Black Hole Video: Opening a New Era in Astrophysics
If the team succeeds in producing the first black hole video, it will usher in an entirely new era of black hole astrophysics. Dynamic video can reveal the real-time evolution of plasma around black holes, helping scientists validate or overturn existing theoretical models, and even discover entirely new physical phenomena. For example, video could show the dynamic process of magnetic reconnection events in the accretion disk, the formation and evolution mechanisms of jets, and the real-time influence of black hole spin on surrounding matter distribution — all critical physical information that static images cannot capture.
As CK put it: "When we look more carefully at the universe, things are often very different from what we initially imagined. That's what makes exploration so powerful."
This case also sets a highly compelling benchmark for AI-assisted scientific research. The role Codex plays here is not to replace scientists but to serve as a powerful "algorithm exploration accelerator" — it vastly expands the solution space researchers can explore within limited time, creating a true synergy between human creativity and AI computational power. This human-AI collaboration model is becoming a defining paradigm in the "AI for Science" wave. From protein structure prediction (AlphaFold) to climate simulation, AI is playing an increasingly critical accelerating role across scientific frontiers.
Conclusion: The Deep Fusion of AI and Frontier Science
From ten days to a few minutes, from impossible to possible — the application of OpenAI Codex in black hole simulation powerfully demonstrates the enormous potential of AI tools in frontier scientific research. When humanity's deepest curiosity meets the most advanced AI capabilities, we are witnessing a fundamental transformation in how science is done. Astronomy, as the ultimate frontier of human exploration, may well achieve unprecedented breakthroughs through the deep involvement of AI.
Related articles

OpenAI Codex Data Analytics Plugin in Practice: The Complete Workflow from Data Collection to Report Delivery
Deep dive into OpenAI Codex's Data Analytics Plugin: cross-system data integration, smart chart generation, data provenance, and Google Slides export reshaping analytics workflows.

OpenAI Codex Creative Production Plugin: How AI Is Revolutionizing Marketing Asset Creation
Deep dive into OpenAI Codex Creative Production Plugin: AI product image generation, Remix style adjustment, one-click brochure creation, and Canva integration for editable output.

Preparing for an Antarctic Cycling Expedition with ChatGPT: How AI Powers Extreme Adventure
An explorer uses ChatGPT to prepare for an unprecedented solo Antarctic cycling expedition. Learn how AI serves as gear optimizer, training coach, and emergency lifeline in extreme adventure.