Skip to content
Sadiq Khan

october 5, 2026 · 1 min read · neuroscience, connectomics, simulation

I made a simulated fruit fly try to walk

24,115 real neurons from the first complete fly nerve cord wiring diagram, wired to a 3D body in a physics engine, on a laptop.

I made a simulated fruit fly try to walk, and watched over 24,000 real neurons fire in real time while it tried.

Here's what happened.

In September, researchers published the first complete wiring diagram of a fruit fly's central nervous system: 166,700 neurons and 125 million connections, every link traced for the first time. I pulled 24,115 of them, the ventral nerve cord and the descending neurons that feed into it, and built a working simulation on my laptop. Then I hooked it up to a 3D fly body in a physics engine and started pressing buttons on it.

Press MDN, the neuron that makes real flies walk. The simulated motor pool fires 349× harder than its baseline.

Press DNp09, the neuron that makes real flies stop. Firing drops within 25 milliseconds, the same reaction time measured in real flies.

Press the one responsible for coordinating left-right leg rhythm. Nothing coordinates. Just noise.

That last part is the interesting one. Published research says flies can't walk from their brain alone: they need constant pressure feedback from their feet to know which leg should move next. My simulation failed in exactly the way the biology predicts.

A connectome is not a working brain. It's a wiring diagram. But if the diagram captures enough of the function, you should be able to tap a neuron, send it a signal, and watch the right part of the body answer. That part works.

There's a live viewer where you can watch all 24,115 neurons fire in real time. A 3D fly in the corner buzzes its wings while a tiny glowing brain inside its head keeps time with the simulation.

The entire thing runs on a MacBook.


Originally posted on LinkedIn.

← All writing

Contact

sadiqkhan795@gmail.com

Say hello. I read everything.