🪰 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.
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
FAQ
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.
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.