MaleCNS v1.0 · electron-microscopy connectome · 2026-11-02
A fruit fly's brain is playing
a game I wrote for it.
166,700 neurons. 25.6 million synapses, every weight measured by slicing one fly into 40-nanometre sections. Nothing in it was trained for this. It flies a three-lane runner, dodges trains, and scores about 164 metres a run. Not great. Not random either.
- 166,700
- neurons
- 25.6M
- synapses
- 0
- trained weights
- 164 m
- mean run
Watch it play
This is not a video. Every time you reload, a fresh episode is generated on a two-core VPS: the connectome runs step by step and streams each frame here as it is computed, so you are watching the fly decide, roughly live. The right panel is what its giant-fibre escape neurons were doing at that instant. Pick a different decoder, or ask for another run — the brain never remembers the last one.
connecting to the connectome…
Who is actually playing?
Same brain, same game, four different ways of turning its spikes into moves. Every run is a fresh episode; hitting an obstacle ends it.
| policy | mean | best | runs | full 18 s |
|---|---|---|---|---|
| random | 93 m | 98 m | 2 | 0 |
| giant-fibre reflex | 88 m | 171 m | 6 | 0 |
| linear readout on the brain | 164 m | 216 m | 6 | 2 |
| oracle (knows the future) | 216 m | 216 m | 2 | 2 |
The reflex loses. Jumping out of the way when the giant fibre fires scored 88 metres — no better than pressing keys at random. The same neuron was perfect in the simpler test below. A ballistic escape reflex is a panic button, not a navigator: in a runner it fires too late, and in two of those runs it never fired at all.
What wins is a linear decoder. Take the activity of all 1,314 descending neurons, apply principal components and ridge regression, and the signal is already there: which lane is safe, roughly. Two of six runs survived the full 18 seconds. Nothing in the connectome changed — the readout just learned to read what the wiring was already doing.
How the loop closes
-
The game writes a scene
Three lanes, obstacles sweeping in at 12 units per second, tall blocks and low barriers. The game knows nothing about the fly.
-
The eye turns it into optic-lobe drive
Angular growth feeds LPLC1/LPLC2, close-range threat feeds LC4, on the side the obstacle is really on. This encoder ships with the simulation package — it is the part that is mine, and it is the part to be suspicious of.
-
The connectome runs
20 ms of simulated time per step, every neuron and synapse accounted for. Measured on this box: about 14 ms of CPU per step, roughly 70 steps a second — faster than the 50 a second the game needs, which is why the run can stream at full speed. No GPU, no training, no backpropagation.
-
A readout reads the descending neurons
One linear model predicts a target lane, a second predicts a jump. That prediction is the only thing that ever touches the keyboard.
Stated plainly: the eye is mine, the wiring is the fly's, and the readout is a two-layer linear model. "The fly plays" means the frozen connectome carries a decodable signal for what to do — not that it learned the game.
First, the control experiment
Before trusting any of the above: does a single spike from the connectome actually move a body? One threat, one correct answer, and a lesion to prove causation.
| condition | closest approach | hits | correct side |
|---|---|---|---|
| sees it (sensitive eye) | 28.7 cm | 0 / 6 | 6 / 6 |
| sees it (conservative eye) | 14.6 cm | 1 / 6 | 5 / 6 |
| blind | 4.1 cm | 3 / 6 | 3 / 6 |
| giant fibre silenced | 0.0 cm | 6 / 6 | — |
The lesion is the point. Silence that one neuron and the fly is hit every single time, at exactly zero clearance. Not a correlation — a cause.
What this does not show
- It cannot jump. With three lanes and at most two blocked, dodging always works, so the oracle never jumped once. The jump decoder was trained on zero positives and is at chance level. That pathway is untested, and I left it out of the claims rather than dress it up.
- The lane signal is coarse. Regression error of 2.06 on a target spanning three lanes. Descending neurons carry a crisp categorical "danger, that side" and only weak graded information — which is exactly why the learnt player still gives up a quarter of the oracle's distance.
- Six runs per policy. Enough to rank them, not enough for tight error bars.
- This is not the fly's own eye. The encoder is a four-channel model of the optic lobe. Change the encoder and the numbers move — the wiring is the fly's, the question is mine.
The machine
simulation
MaleCNS v1.0
166,700 neurons
25.6M synapses
20 ms steps
0.55× real time on 2 vCPU
game
3 lanes · 12 u/s
blocks must be dodged
barriers can be jumped
216 m = survived
source
/opt/flybrain/subway.py
/opt/flybrain/arena.py
/opt/flybrain/export_replay.py