An Astrophysicist on Using Codex to Simulate Black Holes

9 0 0

I’ve been following the intersection of AI and scientific research for a while now, and every once in a while, a story comes along that genuinely surprises me. This is one of them.

Chi-kwan Chan is an astrophysicist at the University of Arizona. You might not know his name, but if you’ve seen the first-ever image of a black hole (the M87 one from 2019), his work is part of the reason that image exists. He builds simulations of black holes—the kind that test the limits of Einstein’s general relativity and help us understand what happens when gravity gets absurdly extreme.

Simulating black holes isn’t like coding a weather app. The math is brutal. The equations are nonlinear, coupled, and often don’t have tidy analytical solutions. Researchers spend weeks writing and debugging code just to run a single simulation. That’s where Codex comes in.

Chan has been using Codex to generate and refine code for his simulations. Not as a replacement for his own expertise—he’s been doing this for decades—but as a tool to offload the tedious parts. Writing boilerplate for numerical solvers, translating equations into code, even debugging weird edge cases. He feeds Codex a description of the physics he wants to model, and it spits out a first draft of the code. Then he tweaks it.

“It’s like having a junior collaborator who never sleeps and doesn’t complain about the boring parts,” he said in a recent interview. That’s higher praise than it sounds. In academia, the bottleneck is rarely ideas—it’s implementation. You can have a brilliant insight about how black holes might warp spacetime in unexpected ways, but if you spend three months implementing it, the insight loses its edge.

What strikes me about this use case is how different it is from the typical “AI replaces human” narrative. Chan isn’t using Codex to automate himself out of a job. He’s using it to compress the time between having an idea and testing it. That’s the real promise of these tools in scientific research: not replacing scientists, but removing the friction that slows them down.

He also mentioned something I hadn’t considered—Codex helps with reproducibility. When you write code manually, you make mistakes. Off-by-one errors, sign errors, forgotten boundary conditions. Codex, when given a clear prompt, tends to produce code that’s syntactically correct and logically consistent. Not perfect, but better than a tired human at 2 AM.

Of course, there are limits. Codex doesn’t understand physics. It doesn’t know that a certain equation is unphysical or that a particular approximation will break down near the event horizon. Chan still has to validate everything. But he estimates it’s cut his coding time by about 30-40%. For a field where time is the most precious resource, that’s massive.

I’m curious to see where this goes. If Codex can handle black hole simulations, what else can it do? Climate modeling? Protein folding? Drug discovery? The pattern is clear: AI isn’t just for generating art or writing blog posts. It’s for speeding up the hard stuff too.

Chan’s work is a reminder that the best uses of AI often aren’t the flashiest. They’re the ones that quietly make experts more effective at what they already do well. And if that means we get to see more black hole images in my lifetime, I’m all for it.

Comments (0)

Be the first to comment!