🪰 Column · Rebuilding a fly brain
Digital Fruit Fly Lab
In 2024 scientists finished the first complete wiring diagram of an adult fruit fly brain: 139,255 neurons and 54.5 million synapses. Put a neuron model on top of that map, plug it into a physics-simulated body, and a 'digital fly' can forage, groom and escape inside a computer. This column brings it to your browser — play first, then understand.
Want to try it now? Control a physics-simulated fly in the browser and watch precomputed whole-brain behavior. The interactive fly is not driven by 139k neurons in real time. To run the brain model yourself, follow the download guide with data, code and Mac mini measurements.
How much fits in a poppy-seed-sized brain
How a digital fly is assembled
- 1
Wiring diagram (connectome)
Slice one fly brain into thousands of ultra-thin sections, image each with an electron microscope, let AI trace every neurite and humans fix the errors. The result: who connects to whom, and with how many synapses.
- 2
Neuron model (LIF)
Each neuron becomes a 'leaky integrate-and-fire' unit: inputs add up until a threshold, then it spikes. Connection strength is just the synapse count — no training at all, only the wiring.
- 3
Physics body (NeuroMechFly)
An anatomically modelled fly body running in the MuJoCo physics engine: jointed legs with sticky feet and wings beating at 218 Hz.
- 4
Brain–body loop
The brain reads the body's senses (taste, vision) and descending-neuron spikes drive the gait. We sync them every 15 ms — that's the 'digital fly'.
Try it in your browser

Drive a fruit fly through a slalom
Three levels, three layers of neural control: in Level 1 a central pattern generator (CPG) coordinates all six legs for you; Level 2 hands you the two tripods; Level 3 gives you one key per leg — and you'll quickly see why a fly never has to 'think' about walking.

Flight sandbox: wings beating 200+ times a second
The wings follow a real fruit-fly stroke pattern, lift comes from MuJoCo's fluid model, and a stabilizing controller only nudges tiny left/right wing asymmetries. You give intent; let go and it hovers. It's real physics in your browser, so it runs at a fixed 0.2× slow motion.

3D bench: move every joint of the fly
The full NeuroMechFly body model: drag sliders to drive each joint and toggle contact forces, joint axes and actuator forces to see how an insect leg is put together.
From worm to human: how far brain mapping has come
| Species | Neurons | Complete wiring diagram |
|---|---|---|
| C. elegans (worm) | ≈300 | mapped 1986 |
| Fruit fly larva | ≈3,000 | mapped 2023 |
| Adult fruit fly | 139,255 | mapped 2024 — this column |
| Mouse | ≈70 million | only 1 mm³ of cortex mapped |
| Human | ≈86 billion | nowhere near |
Compute is another wall: on a Mac mini M4, one second of fly brain time takes about 12.6 s; with noise and whole-brain monitoring it runs 18–24× slower than real time.
Column articles
Was a Fruit Fly Brain Really Uploaded to a Computer? Eon's Demo, Taken Apart Layer by Layer
Eon Systems' 'uploaded fruit fly' is four layers stacked together: FlyWire's wiring diagram, the Shiu 2024 brain model, the NeuroMechFly body, and a hand-built brain–body interface. The widely shared '91% behavior accuracy' is really 91% of 164 circuit predictions in the Shiu paper, not a score for the virtual fly. Rebuilding it from the same open parts, I found the brain fires no spikes without input. What was copied is the structure, part of the function, and not the fly itself.
ReadHow the Fruit Fly Brain Map Was Made: 7,062 Slices, 21 Million Images, 3 Million Edits
One female fly's brain was cut into 7,062 slices 35–40 nm thick and imaged for 16 months: 21 million images, 106 TB. AI traced every neurite; researchers, professional teams and a group of gamers then made 3,013,513 edits, yielding 139,255 neurons and 54.5 million synapses. This walks through each step and explains the 'Google fly brain': Google segmented this fly in 2019, but FlyWire used Princeton's own reconstruction.
ReadWhat Is MaleCNS? The First Whole-CNS Wiring Diagram of a Male Fruit Fly, and How It Differs from FlyWire
MaleCNS maps a male fruit fly's entire central nervous system: 166,700 neurons, with brain and ventral nerve cord in one dataset for the first time. v1.0 shipped June 2026, the Cell paper in September, licensed CC BY 4.0. It's a separate effort from FlyWire: different sex, microscope and AI. Of 11,710 types only 138 are dimorphic. Regrouping FlyWire's annotations by region, I found descending neurons the most sex-variable, at 8.4%.
ReadHow to Download the Fruit Fly Brain and Run It: 139,000 Neurons in 33 Seconds on a Mac mini
Downloading the fruit fly brain means two files: a list of 138,639 neurons and a 15.09-million-row connection table whose synapse counts add up to the 54.5 million in the Nature paper. I ran the official repo from scratch: clone 57 s, install 21 s, the sugar-taste example in 33 s. Switching to the public v783 data as the README says crashes with a KeyError, and a missing output folder only errors after the whole run. Silencing one descending neuron raised feeding output by 30%.
ReadWhat People Built with the Fruit Fly Brain: Mario, Minecraft, DOOM and More — 9 Projects Taken Apart, 2 Retested
Since the fly connectome went public, GitHub has filled with fruit-fly-brain projects: DOOM, Mario, Flappy Bird, Minecraft, a phone app, a desktop pet, even trading signals. I read nine READMEs and asked how many neurons, who really decides the actions, and whether there are controls. I retested two: DesktopFly passes all its suites; Fly Mario falls in a pit 1.7 s after I cut its giant fiber, freezes at 0.8× weights and dies at 1.3×.
ReadI Ran a 139,000-Neuron Fruit Fly Brain on a Mac mini. With No Input at All, Does It Move on Its Own?
I rebuilt Eon's uploaded fly from open parts: a 139k-neuron LIF brain in a MuJoCo body. With input it acts: feeding 0.66 s after tasting sugar, a giant-fiber escape 1.89 s into a looming ball. With no input it is silent. Adding noise and adaptation makes it move on its own, but v1 ticks like a clock (burst CV 0.05). v2 raises CV to 1.2 and walks for up to 4.6 s. Oct 17 update: a 3D render on an RTX 4090 shows which neurons drive each action, and GPU body simulation peaks at about 420k steps/s, 94x one CPU core.
ReadFly, Mouse, Human: How Far Is Whole Brain Emulation? The Math, Starting from a Mac mini Benchmark
A whole fruit fly brain (139,000 neurons) takes 12.6 s on a Mac mini to simulate 1 s, with ~121 MB of weights. Scaling the same model up: a mouse needs ~41 hours per simulated second and ~1.4 TB; a human ~5.7 years and ~1.7 PB. Compute isn't the hardest wall: at FlyWire's rate, proofreading a mouse brain would take ~17,000 person-years, and today's models lack learning, memory and neuromodulation.
ReadFAQ
Was a fruit fly brain really 'uploaded' to a computer?
'Upload' overstates it. What was copied is a wiring diagram: which of 139,255 neurons connect to which. With a simple neuron model on top, it does respond sensibly to stimuli — Shiu et al. (Nature, 2024) used it to predict feeding and grooming circuits that were then confirmed experimentally. But it contains none of that fly's memories, neuromodulators or body chemistry. When we reproduced it, we also found the original model fires no spikes at all without input.
Why a fruit fly?
Its brain is small enough (0.0175 mm³ of neuropil) yet complex enough to learn, navigate and court, with over a century of genetics and behavior research behind it. It's currently the only flying animal whose whole brain has been mapped and can be checked against a large body of experiments.
Can I download the fruit fly brain and run it myself?
Yes. FlyWire's Codex (codex.flywire.ai) offers CSV downloads of the v783 connectome under CC BY-NC 4.0 (attribution, non-commercial), and the whole-brain LIF model from Shiu 2024 is open on GitHub (philshiu/Drosophila_brain_model). A normal computer is enough: on a Mac mini M4, Brian2 simulates 0.1 s of brain time in about 1.26 s. Read the tested download and run guide
Is the fly in the browser controlled by the real brain?
Not quite, and we want to be clear about it. Walking and flight in the online sandbox are driven by CPG oscillators and a stabilizing controller on real physics, not by the whole-brain model — 139k neurons don't run in a browser yet. The brain-driven behaviors (sugar feeding, visual escape, spontaneous activity) are recordings we computed on a Mac mini, shown on the Play page.
How far are we from copying a human brain?
Very far. A human brain has about 86 billion neurons — over 600,000 times a fly's — and for mammals only a single cubic millimetre of mouse cortex has been mapped. Even for the fly, current models use the wiring alone; real electrical properties, neuromodulation and plasticity are mostly simplified or missing.