Projects catalogue · project page
DOOMFLY: the fruit fly brain that "plays Doom", and what the code really does
DOOMFLY feeds frames from the game Doom into a simulation of the complete male fruit fly nervous system (MaleCNS v1.0, 166,700 neurons), and four neurons chosen by the author press the turn, move and fire buttons. Nothing in it is trained. It went viral in September 2026 as "a fruit fly brain plays Doom".
Short answer
A real connectome runs and drives the game. The wiring is the measured MaleCNS v1.0 graph, uncut, and its simulated spikes really move the player. But a person designed how the picture reaches the eyes and chose the four neurons that press the buttons, after checking which ones respond to the screen.
It does not show that the fly brain plays Doom well. The author's own learning experiment did not work, and a third-party control study, doom-fly-control by gabrycina, found that a brainless autopilot, which turns, walks and shoots at constant rates, survives about as long (51.9 s against 53.3 s).
How the loop works
Each game frame is turned into signals for about 4,100 light-sensing cells, the brain model runs, and four descending neurons (cells that send commands from the brain to the body) are read as game buttons. Colours show what is measured, modelled or hand-made.
- Measured (connectome data)
- Modelled
- Hand-made by the author
- Ordinary game code
| Part | What it is | Kind |
|---|---|---|
| Wiring | MaleCNS v1.0, the whole retained graph: 166,700 neurons and 25,582,938 directed connections, no cropping. The loader accepts only this dataset (doom/connectome.py lines 98–174). | Measured |
| Neuron model | A leaky integrate-and-fire (LIF) model, updated over all connections every frame (doom/engine.py lines 78–100). | Modelled |
| Input | Frame brightness and colour are mapped to 3,335 brightness inputs (R1–R6 cells) and 811 colour inputs (R8 cells). The README calls the pixel positions and colour responses "inferred proxies". | Hand-made |
| Output ("bci" mode, used in the videos) | Turn = right minus left DNp20 rate × 0.12; forward = DNpe017 rate × 0.4; fire = any DNpe017 spike. A code comment calls these "chosen joystick mappings, not biological interpretations or a trained game policy" (doom/engine.py lines 121–125). | Hand-made |
| Output ("biological" mode) | DNa02 for turning, DNp09 minus MDN for walking, MN9 for fire. By the author's account this readout produced zero actions. | Hand-made |
| Learning (optional) | An experimental dopamine-gated rule on 4,184 Kenyon cell → MBON11 connections; losing health sends a 200 ms pulse into 2 PPL101 cells. It failed its own tests (see below). | Modelled, experimental |
| Trained or scripted parts | None. The readout gains are fixed, and no game state goes into the decoder. | None found |
Does the brain play? The controls
A control is the same test run with something removed or scrambled. If the scrambled version does just as well, the removed part was not doing the work.
All 19 rows of the source file
| Arm | Key in the file | Seconds survived (mean) | 95% interval | Episodes | Kills (mean) |
|---|---|---|---|---|---|
| DOOMFLY, real wiring | real | 53.34 | 49.73–56.78 | 20 | 12.1 |
| Matched spray autopilot (no brain) | spray_matched | 51.93 | 45.32–57.28 | 20 | 11.75 |
| Spray autopilot setting t0_f0 | spray_t0_f0 | 6.11 | 5.63–6.67 | 16 | 1.625 |
| Spray autopilot setting t0_f10 | spray_t0_f10 | 8.59 | 7.65–9.57 | 16 | 1.625 |
| Spray autopilot setting t0_f20 | spray_t0_f20 | 9.63 | 8.47–10.89 | 16 | 1.875 |
| Spray autopilot setting t1_f0 | spray_t1_f0 | 5.68 | 5.35–6 | 16 | 0.9375 |
| Spray autopilot setting t1_f10 | spray_t1_f10 | 26.7 | 21.91–31.43 | 16 | 6.6875 |
| Spray autopilot setting t1_f20 | spray_t1_f20 | 53.44 | 48.81–57.31 | 16 | 13.25 |
| Spray autopilot setting t2_f0 | spray_t2_f0 | 5.46 | 5.18–5.76 | 16 | 0.25 |
| Spray autopilot setting t2_f10 | spray_t2_f10 | 9.65 | 8.29–10.99 | 16 | 2.625 |
| Spray autopilot setting t2_f20 | spray_t2_f20 | 21.09 | 16.55–26.08 | 16 | 5.0625 |
| Spray autopilot setting t4_f0 | spray_t4_f0 | 5.28 | 5.06–5.53 | 16 | 0.25 |
| Spray autopilot setting t4_f10 | spray_t4_f10 | 7.6 | 6.73–8.52 | 16 | 1.5 |
| Spray autopilot setting t4_f20 | spray_t4_f20 | 11.41 | 9.39–13.59 | 16 | 3.125 |
| Shuffled wiring, seed 0 | shuf0 | 5.48 | 4.99–5.97 | 4 | 0.25 |
| Shuffled wiring, seed 1 | shuf1 | 9.29 | 7.1–11.47 | 4 | 1.5 |
| Shuffled wiring, seed 2 | shuf2 | 5.48 | 4.99–5.97 | 4 | 0.25 |
| No connections | noconn | 5.5 | 5.24–5.76 | 8 | 0.375 |
| No vision (blind) | blind | 10.46 | 8.84–12.83 | 8 | 2.5 |
| Test | Result | Who measured it |
|---|---|---|
Causal-loop check (outputs/doom/bci-validation.json) | Intact brain vs black pixels vs retina disconnected vs all connections removed: removing every connection stops all control. The file itself says "biologically_validated": false and "learning_demonstrated": false. | The author |
| Learning pilot v6 | With learning 3.66 s mean survival, without learning 5.83 s (2 test episodes each; one run stopped at 8 s). Marked "not ready to announce". | The author |
| First learning pilot | 22 episodes: zero Kenyon-cell spikes and zero changed memory connections in every training run. | The author |
| Control study: doom-fly-control | Real wiring 53.3 s and 12.1 kills (20 runs); shuffled wiring 6.75 s (12 runs, 3 seeds); no connections 5.5 s (8 runs); blind 10.5 s (8 runs); brainless constant autopilot 51.9 s and 11.75 kills (20 runs). The real brain presses fire almost all the time (attack fraction 0.94). The same results file also holds a sweep of 12 autopilot settings; the best one survives 53.44 s, slightly longer than DOOMFLY's 53.34 s (checked by us on 30 Sep 2026; all 18 rows of that file are in the chart above, re-matched on 1 Oct 2026). How this compares with 31 other control studies: Does fly wiring help? | A third party (entry doom-fly-control, grade A) |
Our reading
The real wiring matters for producing any output: shuffled or disconnected brains hardly move. But the output it produces is close to a constant "turn slightly right, walk, shoot" command, and in this arena a constant command does as well.
Limits of that test
The autopilot's constants were taken from the real fly's average output, so it shows that a constant policy reproduces the behaviour, not that no brain-driven policy exists. The shuffled groups are small (4 runs per seed), and shuffled brains are much quieter overall, so a control with matched activity is still missing. The study's author says so.
This keeps DOOMFLY at grade B: the connectome runs and drives the game, with hand-made input and output, and there is no evidence of skilled play. The new control does not change the grade. See also the Doom test on Is it real?
The claim and our verdict
| Claim | Source | Verdict |
|---|---|---|
| "Game frames stimulate modeled sensory neurons; activity propagates through the retained MaleCNS v1.0 wiring, and a fixed neuron-to-button interface turns, moves and fires." | README, line 3 | Accurate as a description of the loop. |
| "A fruit fly brain plays Doom" | The author's posts on X (6 and 9 Sep 2026) and a PC Gamer short | Overstated. The readout cells were picked because they responded to the screen; the biological readout gave zero actions; learning did not work; a constant autopilot survives about as long (third-party test). Verdict row |
What you need to run it
| Item | What the README says | Our status |
|---|---|---|
| Platform | Linux or macOS; Python 3.11 and a C++ compiler; Node.js 22.13 or newer for the viewer. No GPU needed. | Untested |
| Memory and data | "The full graph needs several GB of RAM and downloaded data": three MaleCNS v1.0 files listed in doom/datasets.json, checked against a lock file. | Untested |
| Install | python3.11 -m venv .venv-neural, then pip install -r requirements-neural.txt -r doom/requirements.txt | Untested |
| Build | python -m doom.connectome malecns_v1, python -m doom.prepare, python -m doom.audit_data, python -m doom.build_kernel | Untested |
| Run | python -m doom.server --model experimental-v6 --learning --port 8766 …, then the viewer in doom-ui/ with npm ci and npm run dev | Untested |
| Tests | python -m pytest tests/test_doom.py tests/test_doom_reference.py tests/test_doom_live_training.py -q. The README adds: "Passing software tests is not evidence of biological validity". | Untested |
| Speed | Slower than real time, about 0.16–0.21× (from the project's documents). | Not measured by us |
| Online demo | None. The viewer address in the documents is a placeholder. | No online demo |
Known issues
- Readout chosen after the fact. DNp20 and DNpe017 were picked after checking which cells respond to the screen. The author says these are not their natural motor roles.
- Learning failed its vision, conditioning and survival tests (see the controls above).
- Small controls in the repository: two seeds, one reconstructed animal, 12-second episodes, some stopped early. By the author's own notes, the first shuffled control failed its dose check.
- The repository is a fresh snapshot with no history. We did not look at its issue tracker in this check.
Related projects in our catalogue
- Adoom-fly-control
The third-party control study of DOOMFLY and doomfly-rl described above. New on 28 Sep 2026.
- Adoomfly-rl
A trained image encoder, a fly-wired network and a trained policy. Its own tests and the 100-game re-run in doom-fly-control show that real, shuffled and no wiring score the same. New on 28 Sep 2026.
- Aflydoom by mutkuoz
A separate, untrained FlyWire v783 whole-brain Doom player with shuffled-wiring and matched random-agent controls. Not derived from DOOMFLY. New on 28 Sep 2026.
- Afly-brain-zero-shot
The counterpoint: a whole FlyWire brain steers a simulated fly body toward targets, and scrambled wiring or disconnected turn neurons fail (2.96 against 0.34 and 0.12 poles per 10 s). Compared with the Doom test. New on 29 Sep 2026.
- CFlyDoom by eganeganegan
A roughly 5,000-neuron MaleCNS subgraph trained with reinforcement learning (PPO).
- DFlyBrain-HalfLife
Its code says its graph matches "DOOMFLY's graph manifest" and reuses the DNp20 and DNpe017 names, but by default the network is generated by the code, not loaded from MaleCNS. New on 28 Sep 2026.
Videos
- DOOMFLY announcement: Alex Wormuth on X, 6 Sep 2026, 0:07, original upload.
- DOOMFLY playing Doom: Alex Wormuth on X, 9 Sep 2026, 0:10, original upload.
- Related: "Is the fly brain actually playing DOOM?", the control study's own video file (link only).
Both DOOMFLY videos answered our check on 3 Oct 2026. Videos open on their original platform.
Status
| Field | Value |
|---|---|
| Code | github.com/nftechie/DOOMFLY |
| Last commit (default branch) | 71ecf53, 9 Sep 2026; unchanged since our first check |
| Last release | None |
| Code licence | MIT (LICENSE file) |
| Data licence | MaleCNS v1.0: CC BY 4.0 |
| GitHub stars | 404 on 27 Sep 2026 (not re-queried since) |
| Link check | HTTP 200 on 6 Oct 2026 |
| Catalogue entry | doomfly, grade B, last verified 6 Oct 2026 |
Sources
- DOOMFLY repository at commit 71ecf53: README.md, doom/engine.py, doom/connectome.py, outputs/doom/bci-validation.json, doom-ui/public/learning-iterations.json, docs/doom-learning-review.md. Read by us on 28 Sep 2026.
- doom-fly-control repository at commit 6b22922: README.md, REPORT.md, src/run_a2.py, results/a2/summary.json, results/a1/summary.json. Read by us on 28 Sep 2026.
- Our catalogue entries doomfly and doom-fly-control, and the research report of 28 Sep 2026.