{"slug": "i-gave-100-fly-brains-their-own-computers-to-play-doom", "title": "I Gave 100 Fly Brains Their Own Computers to Play Doom", "summary": "A neuroscience student interning at Namespace ran 100 parallel Devbox simulations of DOOMFLY, an open-source project by nftechie that drives Doom using neural activity from the MaleCNS reconstruction of the adult male fruit fly central nervous system, which maps roughly 166,700 neurons and 125 million synapses. Silencing the two neuron pairs the controller relies on — DNp20 for turning and DNpe017 for forward movement and shooting — eliminated all game-control output, and silencing DNpe017 alone changed spike counts in 8,249 other neurons, about 70% of neurons active in the intact run. The experiment used 100 two-minute runs across four game seeds with six experimental conditions, one intact control, and eighteen sham knockouts per seed, provisioned via Namespace Custom Images and the TypeScript SDK.", "body_md": "# I Gave 100 Fly Brains Their Own Computers to Play Doom\n\nA couple of weeks ago, I came across MaleCNS, a reconstruction of the adult male fruit fly's central nervous system by HHMI Janelia, Google Research, and collaborators. It maps roughly 166,700 neurons and 125 million synapses.\n\nEven more interesting, I found [DOOMFLY](https://github.com/nftechie/doomfly), an open-source project by nftechie that connects a simulation based on this connectome to Doom. It uses neural activity from the simulated fly brain to control movement, turning, and shooting.\n\nAfter watching a Reel where a fly brain outperformed my Beat Saber high score, I wanted to try an experiment of my own. What would happen if I started switching off neurons? Would the effects stay local, or could disabling just two cells trigger changes across thousands of others?\n\nAs a neuroscience student interning at Namespace, I'd been experimenting with [Devboxes](https://namespace.so/devbox), development environments that can be created programmatically and run in parallel. Giving each fly brain its own Devbox seemed like a perfect fit.\n\n## Designing the experiment: Breaking a Fly Brain\n\nIn [DOOMFLY](https://github.com/nftechie/doomfly), Doom frames pass through a simulated retina, neural activity propagates through the network, and a decoder translates that activity into game controls. While DOOMFLY maps roughly to 166,700 neurons, what caught my attention was how few neurons actually mattered to the controller. Although DOOMFLY records activity from 14 readout neurons, its controller relies on just two pairs:\n\n- DNp20 (left and right): Determine turning.\n- DNpe017 (left and right): Determine forward movement and shooting.\n\nThese are engineered assignments, not natural fly motor functions. Silencing just two of the twelve MeVP9 neurons upstream of both pairs eliminated all game-control output. Even more surprising, most of the simulated brain was effectively silent. Almost all were in the visual system, with only 1,341 active neurons outside the directly stimulated populations.\n\nI started by silencing DNp20, DNpe017, and both pairs together, zeroing their incoming and outgoing synapses. As expected, turning stopped completely without DNp20, while movement and shooting stopped without DNpe017. Those effects were built into the decoder.\n\nBut the rest of the network was a different story.\n\nMy initial results suggested that silencing DNpe017 changed the spike counts of 8,249 other neurons. That's roughly 70% of the neurons active in the intact run. Was the disruption spreading through the brain, or was this simply what happened whenever I perturbed the simulation?\n\nTo find out, I added sham knockouts, silencing random neuron pairs with comparable activity and connectivity, excluding neurons directly supplying input to the cell types I was studying. I also tested the upstream MeVP9 pair and added two visual controls: a black screen and a frozen first frame.\n\nI began with an open-loop experiment: each brain watched a live, seeded Doom game with a scripted camera sweep, while its commands were recorded but never applied. This ensured identical visual inputs for each experimental condition. I then moved to a closed loop, where each brain controlled its own game, with every action shaping what it saw next.\n\nBoth experiments used the same design: 100 two-minute runs across four game seeds, with six experimental conditions, one intact control, and eighteen sham knockouts per seed. Running this across 100 identical dev environments took some work, and the rest of this post covers how we did it.\n\n## Scaling to 100 identical environments\n\nThe challenge was getting [DOOMFLY](https://github.com/nftechie/doomfly) running across 100 identical environments.\n\nI used Namespace Custom Images to package the dependencies once, rather than installing everything separately on each machine. From there, I used the TypeScript SDK to provision [Devboxes](https://namespace.so/devbox) programmatically.\n\nOnce it was ready, I could spin up 100 [Devboxes](https://namespace.so/devbox), each took 89 s in the open-loop run and within 59 s in the closed-loop run. I already tested the experiment on four Devboxes, where 100 simulations finished in under 13 minutes. Now I wanted to see what happened when each run had its own machine.\n\nI launched the experiment with one simulation per Devbox. The new batch finished in roughly nine minutes, with one run requiring a retry. Beyond speed, I wanted to ensure the experiment hadn't changed results. I ran verify_results.py across all 100 open-loop simulations; every run passed.\n\nThe results were byte-for-byte identical to the earlier four-Devbox run, down to the individual neuron counts. Four machines or a hundred, the science stayed exactly the same. I could scale the infrastructure without compromising reproducibility.\n\n## Results and Takeaway\n\n| Category | Simulations (devboxes) | Kills | Deaths | Kills per Death | \n|---|---|---|---|---|\n| Intact | 4 | 109 | 4 | 27.2 | \n| Shams | 72 | 1993 | 94 | 21.2 | \n| Frozen frame | 4 | 115 | 25 | 4.6 | \n| Blank Screen | 4 | 105 | 50 | 2.1 | \n| DNp20 off (no Turning) | 4 | 86 | 51 | 1.7 | \n| DNpe017 off (no forward or shooting) | 4 | 14 | 86 | .2 | \n| Both DNs off (no turning, forward, or shooting) | 4 | 14 | 86 | .2 | \n| MeVP9 off (two upstream neurons; same result as both off) | 4 | 14 | 86 | .2 | \n| **Total** | **100** | **2450** | **482** |  | \n\nThe intact fly wasn't exactly an e-sports star. It circled in the same direction, fired 94% of the time, and somehow managed to kill around 27 monsters while surviving roughly 80 seconds. Apparently, “spray and pray” shooting along with running in circles is a moderately effective Doom strategy.\n\nThe blind fly was even stranger. With nothing but a black screen for visual input, it still moved, turned, and managed 22 - 29 kills. Without light, the photoreceptors fell silent, releasing some downstream neurons from inhibition. A constant background current kept them firing, allowing the fly to shoot on roughly 44% of game tics. It also died 12 - 13 times in two minutes. Turns out you can hit things without seeing them. Staying alive is another matter.\n\nMy favorite was the DNp20 knockout. Without the ability to turn, the fly walked straight into a wall and stayed there shooting. It still racked up 17 - 27 kills. Getting out of the way is an underrated skill when your enemies have friendly fire enabled.\n\nAnd the difference came down to a handful of neurons. All 16 targeted knockout runs died within the first ten seconds. None of the four intact brains or 72 sham knockouts did.\n\nOn the infrastructure side, the result was just as satisfying. I ran 100 independent simulations across 100 Namespace [Devboxes](https://namespace.so/devbox) in minutes, and even the closed-loop games were reproducible frame for frame.\n\nWhat started as a curiosity about a simulated fly brain turned into 100 reproducible Doom games, a few lessons about neural knockouts, and one very persistent fly shooting at a brick wall.\n\n## The results (for the neuroscience-curious)\n\nThere was still the original question: did silencing just two neurons send disruptions throughout the simulated brain?\n\nAt first, it looked that way. Silencing DNpe017 changed the spike counts of 8,249 other neurons, roughly 70% of those active in the intact simulation. However, sham knockouts of unrelated neurons with comparable firing activity and connectivity produced similarly widespread changes. This suggested that the apparent brain-wide disruption wasn't specific to DNpe017.\n\nOnce I accounted for the sham results, the effects specific to the targeted knockouts were surprisingly local.\n\nSilencing DNpe017 eliminated activity in w-cHIN, a group of neurons in the fly's ventral nerve cord, roughly its equivalent of a spinal cord. These neurons sit just one synapse downstream of DNpe017, and their combined spike count dropped from approximately 1,400 to zero.\n\nThe MeVP9 knockout showed how far this effect could extend. Silencing two MeVP9 neurons shut down activity in their direct targets, including DNp20, DNpe017, and PS278. The disruption then reached w-cHIN through DNpe017, two synapses downstream of MeVP9. Beyond that, no changes exceeded what I observed in the sham knockouts.\n\nSilencing DNp20 produced different effects on neural activity in the open-loop and closed-loop experiments.\n\nIn open loop, every brain received identical visual inputs, and silencing DNp20 didn't change the spike counts of other neurons, including w-cHIN.\n\nIn closed loop, however, the fly's actions determined its visual input. Without DNp20, the fly couldn't turn and walked straight into a wall. The resulting change in visual input was accompanied by a roughly 16% increase in DNpe017 activity. Activity in w-cHIN also more than doubled, rising from roughly 1,050 spikes in the intact brain to 2,200 with DNp20 disabled. This occurred across all four game seeds and was far outside the sham knockouts' range of 1,041 to 1,208 spikes.\n\nThe difference was feedback. Silencing DNp20 altered the fly's behavior and, consequently, its sensory input, changing neural activity elsewhere in the brain. The effect traveled through the game environment rather than directly through neural connections from DNp20.", "url": "https://wpnews.pro/news/i-gave-100-fly-brains-their-own-computers-to-play-doom", "canonical_source": "https://namespace.so/blog/fly-brains-play-doom", "published_at": "2026-10-16 19:04:38+00:00", "updated_at": "2026-10-16 19:19:42.990432+00:00", "lang": "en", "topics": ["artificial-intelligence", "neural-networks", "ai-research", "ai-infrastructure"], "entities": ["Namespace", "DOOMFLY", "nftechie", "HHMI Janelia", "Google Research", "MaleCNS", "Devbox", "DNp20"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/i-gave-100-fly-brains-their-own-computers-to-play-doom", "markdown": "https://wpnews.pro/news/i-gave-100-fly-brains-their-own-computers-to-play-doom.md", "text": "https://wpnews.pro/news/i-gave-100-fly-brains-their-own-computers-to-play-doom.txt", "jsonld": "https://wpnews.pro/news/i-gave-100-fly-brains-their-own-computers-to-play-doom.jsonld"}}