A mapped-out fruit fly brain has become the latest unconventional system to run Doom, the 1993 first-person shooter renowned for operating on everything from pregnancy tests to potatoes. The project uses a digital simulation of a male fruit fly’s brain to play the game frame by frame, with no human assistance guiding the inputs.
The foundation for the experiment came from a large-scale neuroscience effort. Google partnered with HHMI Janelia Research and other collaborators to map the brain and central nervous system of a male fruit fly. The resulting map contains 11,700 types of neurons and 166,000 neurons overall, setting a record for the most complex neuron mapping completed to date.
How the fly brain learned to play Doom
The research involved slicing a fly’s brain and body into very thin sections, imaging them, and using AI to combine millions of 2D images into 3D neural shapes. According to Google, understanding the structure of the brain allows neuroscientists to grasp the mechanisms behind brain function.
Software engineer Alex Wormuth built a simulated fly brain from Google’s map a few days after the research was released, then set it loose to learn the pioneering shooter. The process is intricate. Each frame of the game generates 3,335 brightness inputs and 811 R8 colour inputs, which are fed into the simulated brain and its 25.6 million connections. These inputs reach specific neurons based on what the frame displays, and that information determines which controls the fly uses. The cycle repeats with every frame.
The simulation even accounts for pain. Wormuth says nonfatal damage targets the PPL101 dopamine receptors, which control hunger and aggression in real fruit flies. Progress can be viewed on Wormuth’s Doomfly website, which displays sensory input, neural activity and other metrics in real time. A 3D view shows the fly shooting demons.
Other games and experiments
Doom is not the only challenge given to a simulated fly brain. Developer Jessica Paquette configured a similar neural network to learn Super Mario 64, while mechanistic interpretability researcher Lyra Bubbles set one up to play Beat Saber.
The experiments have since branched out further. X user David began teaching the brain to complete an escape room, and Shashank Jain taught it to play football. Wormuth later gave the fly brain roughly £75 worth of bitcoin to trade to observe its behaviour, and X user Simba made the brain deploy its own cryptocurrency token on Robinhood.
The fly brain mapping is expected to carry significant weight in neuroscience over the long term, with the underlying data breaking the record for the most complex neuron mapping ever produced.