Astrophysicist Uses OpenAI Codex to Simulate Black Holes, Einstein Verification Accelerated
When Chi-kwan Chan sits down to probe one of the universe's most violent phenomena, his collaborator is increasingly an AI. The University of Arizona astrophysicist has been using OpenAI Codex to help write and refine the simulation code underpinning his black hole research — work that places Einstein's general theory of relativity under conditions no terrestrial lab could ever replicate. What once demanded weeks of painstaking coding can now move at a pace that keeps up with the science itself.
Chan's research centers on modeling the behavior of matter and radiation near black hole event horizons, the boundary beyond which not even light escapes. These simulations are notoriously code-intensive, requiring precise numerical methods to solve the equations of general relativity in curved spacetime. Codex, trained on vast repositories of code, can suggest implementations, catch subtle bugs, and propose optimizations — effectively acting as a knowledgeable pair programmer who never tires and holds the syntax of a dozen scientific computing libraries in memory at once.
The practical payoff is significant. Faster iteration on simulation code means more parameter space explored, more edge cases tested, and ultimately a sharper picture of how gravity behaves at its most extreme. For a field where observational data — like the Event Horizon Telescope's iconic black hole images — arrives rarely and at enormous cost, the ability to run richer simulations cheaply is a genuine scientific accelerant. Chan has noted that Codex helps him spend less time wrestling with implementation details and more time thinking about the physics.
The story is a quiet but telling illustration of how AI coding assistants are finding their way into research domains far removed from software engineering. Theoretical and computational physicists have long written code as a means to an end, rarely as a craft in itself. Tools like Codex lower the barrier between a physical intuition and a running simulation, compressing the loop between hypothesis and numerical result. As these models improve, the boundary between thinking about a problem and computing an answer may continue to narrow — with implications that stretch well beyond any single black hole.