This fruit fly learns nothing. It simply copies the real wiring diagram of a male fruit fly's nervous system and runs every neuron as a simple part that fires electrical pulses. And yet, when it tastes sugar it extends its proboscis, when something bitter is mixed in it stops, and when something rushes at it, it jumps. If the previous two pages asked "how does a brain-like neural network learn?", this page asks the opposite question: without any learning, can behavior emerge from the connections alone?
Subject: github.com/blendi-remade/fly-brain-minecraft (Fabric mod, Minecraft 1.21.1). The numbers on this page come from the mod repository's documentation (README, docs/VALIDATION.md). Hover over or tap any word with a dotted underline to see its meaning.
Put a fruit fly mob into Minecraft, and run an entire real fruit fly nervous system inside its head. What the mob sees, smells, and tastes stimulates real sensory neurons, and the activity of real descending neurons and motor neurons is read out to move the mob. Each fly runs its own brain on its own thread in real time.
The whole central nervous system: the brain plus the ventral nerve cord (the insect's spinal cord). It uses the public data (neuPrint male-cns:v1.0) from the paper by Berg et al. published in Cell on September 3, 2026. The mod was built on the very day the paper came out.
It follows exactly the method Shiu et al. (2024) Nature used to simulate the whole fruit fly brain. No values are tuned per neuron; the synapse count of a connection is its connection strength.
Apples, cakes, spider eyes, rain, and charging players become sensory input, and the brain's commands become the mob's movements such as walking, eating, jumping, and grooming. This part was built by hand.
/flybrain build command places the 141,781 neurons whose cell-body positions have been reconstructed as stained-glass blocks colored by region. When a neuron in a linked mob fires, its block flashes as a sea lantern.Images: fly-brain-minecraft repository docs/media (MIT License, © 2026 Blendi Remade / fal.ai). Only resized. Minecraft is a trademark of Mojang/Microsoft.
If the previous two pages saw "adjusting connection strengths through experience" as the heart of neural networks, this mod tests "how far you get when the connection strengths are taken straight from the wiring diagram." There is no learning. Few numbers are set by people. The most important is the global gain of 0.65 multiplied into every connection; besides that there is a 0.25× factor on Kenyon cell input and the rule "drop connections with fewer than 5 synapses."
We grouped the studies cited in the repository's README and reference document (REFERENCE.md) by role. Two papers are central: what is connected comes from Berg et al. (2026), and how it is run comes from Shiu et al. (2024).
The brain and ventral nerve cord were imaged as a single electron-microscopy volume, and every neuron and synapse was traced. It is also the first study to compare male and female brains at the level of individual synapses.
Cell 189(18):5504–5526 · doi:10.1016/j.cell.2026.08.015
They ran every neuron in the FlyWire female brain wiring diagram as a leaky integrate-and-fire part, predicted sensorimotor pathways such as sugar taste → proboscis extension, and confirmed them experimentally. The mod's neuron equations and numbers are taken straight from this paper.
Nature 634:210–219 · doi:10.1038/s41586-024-07763-9
A public tool for querying connectomes. All the neuron names in the mod (DNp01, MN9 …) are neuPrint cell-type names, so you can look up any neuron on screen directly on the web.
Front. Neuroinform. 16:896292
Nern et al. (2025) full inventory of the visual system, Hoeller et al. (2026) visual pathways, Tastekin et al. (2026) taste-feeding connectome. Used to decide which sensory neurons receive the game input.
Nature 641 · 2 papers in Cell 189(18)
Walking and stopping (Sapkal 2024), turning (DNa02), the giant fiber and looming escape (von Reyn 2014, Ache 2019), landing (Ache 2019), antennal grooming (Hampel 2015), wingbeat strength (Namiki 2022). These are the basis for the rules that read neuron activity as the mob's movement.
Nature · Nat Neurosci · eLife · Curr Biol
Male ventral nerve cord studies by Takemura et al., Marin et al. (2024), and Cheong et al. (2026), and the study of male-specific neurons (pC1, P1) by Rubin et al. (2026). They underlie the courtship-song connections, but this feature has not been demonstrated yet.
eLife 13 · Curr Biol (2026)
Why the numbers differ slightly. The paper's abstract counts 166,700 proofread neurons. The mod simulates all 176,422 entries loaded from the neuPrint dataset, and builds the 141,781 of them whose cell-body positions have been reconstructed into the block structure. The difference seems to come from different counting criteria.
Relation to the earlier page. The FlyWire (2024) connectome cited on page ① is the very female brain wiring diagram that Shiu et al. (2024) used. This mod applies the same method to a larger male nervous system (brain + ventral nerve cord).
To the 3D brain from the previous page we added the ventral nerve cord (the long lump at the bottom), the neck, and the proboscis, because this mod runs not just the brain but also the motor neurons that move the legs and wings. Pick a scene and a green signal follows the actual connection pathway. This is a schematic model, not real anatomical data.
All 170,000 neurons are this one part. When input spikes arrive the voltage rises, and if left alone it leaks back down to the resting voltage. Once it crosses the threshold (−45 mV) it fires a spike and immediately resets to −52 mV. It is page ①'s "super-simple model" y = [w·x ≥ θ] with time and leak added.
Sum input × weight; output 1 if it crosses the threshold, otherwise 0. There is no time, so the answer appears the instant the input arrives. Weights are set by learning.
Input builds up over time and leaks away. So "how often, and how many at once" inputs arrive matters. The weight is fixed at the wiring diagram's synapse count × 0.275 mV × gain 0.65.
The sign of a connection is set by the neurotransmitter the neuron releases. Acetylcholine, dopamine, serotonin and others are excitatory (+); GABA, glutamate, and histamine are inhibitory (−). All outputs of one neuron have the same sign (Dale's principle). The result: 116,390 excitatory and 60,032 inhibitory neurons. The "inhibitory synapses are negative weights" line in page ①'s summary table is set here directly by the wiring diagram.
Modeled on the mod's "Neuroscope" (H key) screen. Pick a scene: sensory neurons are stimulated, the signal passes through intermediate neurons, and the firing rates of descending and motor neurons go through the decoder's priority ladder to become behavior. The pale band on each bar is the actual measured range from the repository's validation record (VALIDATION.md).
It builds 21 command channels (forward, turn, backward, stop, jump, eat, groom …) by summing the firing rates of neuron groups. When two or more are on at once, they win in this order: escape > landing > flight > sudden stop > stop > backward > forward > eat > groom > song. Once entered, a behavior stays for at least 250 ms and exits only when its signal drops below half the threshold. Which neurons turn on is decided by the wiring diagram, but this ladder and these thresholds were set by people.
Shiu et al.'s 0.275 mV per synapse was fitted to the female brain (FlyWire). The male nervous system has more synapses per neuron, so using that value as is makes the whole network overexcited. So a single gain multiplied into every connection was re-tuned using the same method as the paper.
They picked the smallest gain that satisfies all three conditions: ① sugar input reliably turns on the proboscis motor neuron; ② the grooming and escape pathways are stable; ③ the Kenyon cells of the learning center stay quiet. At 0.55 eating is weak; at 0.75 activity runs away.
It's like leaving individual weights alone and choosing a hyperparameter, such as the initialization scale, through validation experiments. The 0.25× factor for Kenyon cells corresponds to a correction applied to one specific layer. And if it's too large, activations blow up as they pass through layer after layer — a "runaway" just like in deep neural networks.
The best thing about this repository is that it draws the line itself. The README states that "the point of this project is being honest in the last column (source)." Each behavior is tagged emergent (arising on its own from the wiring diagram), hand-built (a stand-in made by people), or mixed.
Mind the scope of "emergent." Here, emergent means "it came out of this computer model without hand-written rules." It is not a result confirmed in real male fruit flies, but the result of automated tests (benches) that run the model alone without the game. Some of the same pathways (sugar → MN9, grooming) were predicted by Shiu et al. (2024) with a female brain model and confirmed in animal experiments.
| Behavior | In-game trigger | Pathway in the wiring diagram | Source |
|---|
Which descending and motor neurons turn on for which sensory pattern · bitterness switching off eating just before the motor stage · left/right asymmetry in turning · the opposition between walking forward and backward · the giant fiber's single-spike jump decision · the choice of which body part to groom
Retina rendering and brightness adaptation · the odor map and distance falloff · the scale factor that converts firing rate into blocks/second · thresholds and the priority ladder · flight and landing physics · injecting the looming signal directly into LC4 and LPLC2 · the 0.25× factor on Kenyon cell input · the reflex layer that walks toward odors
This mod is a neuroscience project, but its design has a lot in common with today's AI systems. We've mapped out the parallels for people learning or teaching generative AI, and for those bringing AI into the workplace.
Page ① is an introduction to neural networks, page ② illustrates the memory retrieval paper, and then there's this Minecraft mod. All three follow "senses → brain → behavior," but they differ in what they keep real and what they simplify.
The horizontal axis is how faithfully the real wiring diagram is used, and the vertical axis is how central it is to modify connections through experience. The previous two pages sit in the upper left, and the mod in the lower right. The upper right — models that learn on top of a real wiring diagram — is a field that has only just begun. A prime example is Lappalainen et al. (2024) Nature, which kept the real connections among 64 cell types of the fruit fly visual motion pathway fixed and used deep learning to train only the unknown neuron and synapse values. That model's predictions matched measurements from 26 studies. It is the very pathway (T4, T5) that is silent in this mod. However, no model yet runs the entire brain and body together while also including learning and neuromodulation.
Press the buttons to switch between diagrams of the six architectures. Green lines are learned connections, dotted lines are fixed connections, and orange arrows are memory carried across time. All diagrams are schematics that illustrate the principle.
Gray bar = total connections, colored bar = learned connections. Deep learning models learn everything; in the fruit fly models most connections are fixed. The trainer below and Code 2 in common section A count the same numbers.
Level of evidence in the last row: Real circuit/measured the model copies a real circuit · Similar structure the connection pattern looks alike, which is not evidence that it performs the same computation · Loose analogy · Pure analogy just a figure of speech to aid explanation, with no biological basis.
Surprisingly, the architecture in the table most like this model is the RNN. Both run a loop over time and have feedback connections. The decisive difference is where the weights come from. An RNN starts random and learns by backpropagation; this model uses wiring measured by electron microscopy as is. In between lies the method of Lappalainen et al. (2024): keep the wiring as measured and train only the unknown values with deep learning.
Like Teachable Machine: ① collect examples for each class, ② train, and ③ check with new input. All computation happens inside this browser; your drawings and webcam video never leave it. To run the same model in code, use Code 2 in common section A.
Collected samples are saved automatically in this browser and survive a page refresh. Exported data and model JSON files can be loaded back in.
Getting started: press "Fill sample data," or draw on the pad and press "Add drawing" on a class. Click a name to rename it.
The flow of create classes → collect samples → train → live preview → export, webcam input, and doing all computation in the browser.
Teachable Machine uses transfer learning: it trains only a small classifier on top of features pre-extracted by a large image model (MobileNet). This trainer has this page's models learn 16×16 drawings from scratch. So it suits simple shapes and struggles with complex input like photos. In exchange, it shows you the validation accuracy and the number of learned connections directly.
Artificial neural networks that borrow the brain's principles solve problems by adjusting connection strengths through experience. The fruit fly's mushroom body likewise changes connections with dopamine to pair odors with outcomes, and that memory becomes behavior by passing through the instinct circuit (lateral horn).
If you take connection strengths straight from the wiring diagram, eating, rejecting bitterness, jumping, and grooming come out of the right neurons even without learning. On the other hand, parts that need learning and modulation, such as following odors, are still handled by human-made stand-ins.
Key point 1. Structure (wiring) alone produces many behaviors. Much of a fruit fly's innate behavior is engraved in the connections themselves.
Key point 2. Learning and memory (mushroom body, dopamine) are the blank this mod leaves empty. The Kenyon cells are deliberately kept quiet, and there are no neuromodulators. The memory retrieval circuit on page ② is exactly that blank.
Key point 3. All three projects mark "how much of this is real" — the pages with yellow stamps, the mod with emergent/hand-built tags. That's the most important habit when making science easy to see.
Both codes use only libraries preinstalled in Colab. Click "Download notebook (.ipynb)" and open it in Colab via File → Upload notebook, or copy and paste it into a new notebook cell.
It builds fixed weights as synapse count × 0.275 mV × gain 0.65 (sign set by the neurotransmitter), stimulates 20 sensory neurons at 120 Hz, and computes 100 steps of 0.5 ms each. Not a single weight is learned. To use your own data, load syn (the synapse-count matrix) from a real connectome file.
Trains MLP, CNN, RNN, GRU, LSTM, and three fruit fly models on the same drawing data. The fixed-wiring spiking model (ConnectomeLIF) fixes the connections of its 160 hidden neurons and trains only the readout layer. Cell 8 plots the spike raster.
| Item | Code 1 (fixed-wiring spiking) | Ordinary deep-learning code |
|---|---|---|
| Source of weights | Synapse count measured by electron microscopy × 0.275 mV × gain | Start random, then learn |
| Learning | None (people calibrate only a few values, such as the gain of 0.65) | All connections learned with surrogate gradients |
| Derivative of a spike | Not needed (there's no learning) | It's a step function, so the gradient is 0 → work around it with a surrogate gradient |
| Handling time | 0.5 ms × 100 steps = 1 game tick | 20-step time loop + backpropagation through time |
| Scale | 176,000 neurons, 6.29 million connections (500 in the example) | Typically hundreds to thousands of neurons |
| Purpose | Predict and explain what a real brain would do | Task performance (accuracy) |
| Reading the output | A human-made decoder (priority ladder) | The output layer directly gives class scores |
Prompts to paste into an AI assistant such as ChatGPT, Qwen, or Claude. Pressing "Copy" appends the selected code after the prompt. Replace the parts in 〔 〕 with your own situation.
An AI's answer is only a starting point. Always verify any suggested papers, figures, or library functions against the original sources and official documentation. If you used AI help for a competition entry or paper, disclose that you did and to what extent, following the rules of the organizers or journal.
This is the same dictionary as the yellow dotted underlines in the text. Hover over or tap an underline to see the same explanation.
Analogies are a first step to understanding, but they can also plant misconceptions. Fruit fly/brain analogies are marked by strength: Direct there is evidence it actually does the same thing · Partial only some properties are alike · None no known counterpart
| Concept | Everyday analogy | Fruit fly/brain analogy | Where the analogy breaks down |
|---|---|---|---|
| Leaky integrate-and-fire | Pouring water into a leaky bucket: when it overflows, empty it and fill it again | Direct A real neuron's membrane voltage builds up with input, leaks away, and fires a spike at threshold | Real neurons vary in shape and ion channels. This model uses the same values for every neuron |
| Wiring diagram = pretrained weights | Getting a map someone else made and only using it to find your way | Partial Synapse counts measured by electron microscopy are used directly as connection strengths | Generative AI weights are learned from data; the wiring diagram is measured. Their origins are complete opposites |
| Gain tuning | Turning a single master volume knob on a stereo | None | A real brain has no global gain knob. It's a value people chose to fit the male nervous system |
| Reflex layer (stand-in) | A human grabbing the wheel when a self-driving car hesitates | None | The reflex layer isn't a biological circuit but rules written by people. The [REFLEX] tag on screen marks those moments |
| Emergence | Each ant is simple, yet the whole colony behaves in complex ways | Partial No rules were added, yet feeding and escape come out of the wiring diagram | "Emergence" is a result inside this model. It hasn't been confirmed in real male fruit flies |
E-1 About the author · E-2 Academic references · E-3 Image credits
| No. | Content | Value | Source |
|---|---|---|---|
| [1] | Number of simulated neurons, connections, and synapses | 176,422 / 6,287,749 / 90.3 M | fly-brain-minecraft README, PROVENANCE.md, VALIDATION.md §0 (neuPrint male-cns:v1.0, only connections with 5 or more synapses) |
| [2] | Number of retinal columns, 50 ms tick, no learning, neuron equation values | 877 + 892 columns · τm 20 ms · τs 5 ms · −52/−45 mV · refractory period 2.2 ms · 0.275 mV × 0.65 | docs/REFERENCE.md "How it works", Shiu et al. (2024) |
| [3] | Firing-rate ranges, active neurons, and real-time factor in the behavior dashboard | Ranges in the table | docs/VALIDATION.md §1–8 (automated tests run without the game, 2026-09-03) |
| [4] | Comparing gain 0.55 / 0.65 / 0.75 | §9 table | docs/VALIDATION.md §9 |
| [5] | Number of neurons in the connectome paper | 166,700 (proofread and annotated) | Berg et al. (2026) Cell 189(18):5504–5526 |
| [6] | Whole-brain leaky integrate-and-fire model | — | Shiu et al. (2024) Nature 634:210–219 |
| [7] | Visual system model with values learned by deep learning on top of the real wiring diagram | 64 cell types, matches 26 experimental studies | Lappalainen et al. (2024) Nature 634:1132–1140 · doi:10.1038/s41586-024-07939-3 |
| [8] | Two game screenshots | — | fly-brain-minecraft docs/media (MIT License) |
A guide for instructors, on-the-job training (OJT) leads, and tutors. Times are estimates; adjust them to your actual class.
| Audience | Learners who have finished Special 1 and 2. Practitioners interested in brain simulation and digital twins |
|---|---|
| Prerequisites | Special 1's ② Perceptron; Special 2's fixed pathway + learned correction |
| Learning goals | ① Explain the leaky integrate-and-fire neuron equation in words ② Tell apart behavior that emerges on its own from the wiring diagram and stand-ins built by people ③ Compare the strengths and limits of a model with almost no learned connections against deep learning |
| Estimated time | Reading 50–60 min · animation demos 25 min · Colab practice 30 min (Code 1: 10 min; Code 2: 2 min to run + 15 min to interpret) |
Intro 5 min (game screens) → One neuron 15 min → Watching behavior 15 min → Real vs. stand-in 10 min → Check questions 5 min.
Watching behavior 15 min → Rewrite Real vs. stand-in as a "model vs. rules" table for your own system 25 min → Try transferring it 15 min → Run and interpret Code 2 25 min → Prompt cards 10 min.
Beginners: just What is it, One neuron, and Watching behavior. Intermediate: derive the "162 simultaneous synapses" from the equation in One neuron, and change the gain in Code 1 to compare spike counts.
| Section | Question to pause and ask | Hands-on tip |
|---|---|---|
| What is it | "Can a neural network that doesn't learn be useful?" | Start with the two game screenshots |
| One neuron | "Why do spike times differ even with the same input?" | Change the synapse count and gain and watch the output firing rate |
| Watching behavior | "At which stage does feeding stop when you add bitterness?" | Press Sugar, then Sugar + bitter, in that order |
| Tuning the gain | "Why does it run away at 0.75?" | Compare the grooming graphs at 0.65 and 0.75 |
| Real vs. stand-in | "When [REFLEX] appears, who's driving?" | Replay the apple-odor scene |
| Comparing three projects | "What sits in the upper right (real wiring diagram + learning)?" | Point to the Lappalainen (2024) dot on the map |
| Practice: Trainer | "How many % can 483 learned connections get right?" | Alternate training the fixed-wiring spiking model and the MLP |
| Misconception | Correct explanation | Scene to show |
|---|---|---|
| A connectome alone fully reproduces the brain | Neuromodulators, electrical synapses, and neuron-specific properties are missing. The odor pathway saturates, so a stand-in takes over | The limitations list in Real vs. stand-in |
| The fly in the game learns | There are 0 learned weights. Only a few values, such as gain 0.65, were set by people | Hero numbers, Tuning the gain |
| The firing-rate numbers are those of real fruit flies | They're benchmark results from the model; don't trust the absolute values, look only at the patterns | The faint bands in Watching behavior |
| The emergent behaviors were confirmed in experiments on real fruit flies | They're results inside this model. Only some pathways were confirmed in animal experiments by other studies | The paragraph on the scope of "emergence" in Real vs. stand-in |
| Spiking neural networks can't learn | In machine learning they're trained with surrogate gradients. That this mod doesn't learn is a design choice | Structure comparison, Code 2 |
30 × 0.275 × 0.65 ≈ 5.36 mV.
7 mV to threshold. 7 / 0.1575 ≈ 44.4 mV. At gain 1.0 that takes about 162 synapses at once; at gain 0.65, about 249.
At the stage just before the motor output. The bitter brake (Scapula) blocks the feeding-command pathway.
Within 200 ms, spikes per tick grow fivefold, Kenyon cells wake up at 39 Hz, and the resulting inhibition even shuts off the grooming command neurons (runaway).
Learning only about 4% of the connections still gets a fair amount right, but because it can't learn the representation itself, it scores lower than the MLP. Also mention that with so little data (32 test samples), the difference swings by ±0.1.
In Code 1, change the gain from 0.65 to 0.55 and 0.75, report the number of neurons that fired and the average firing rate in a table, and interpret it in two sentences, linking it to the runaway in the "Tuning the gain" section.
In Code 2's ConnectomeLIF, change every inhibitory neuron sign (−0.5) to +0.18 (removing inhibition) and retrain. Compare the spike raster (cell 8) and accuracy across two seeds, and write about what inhibition does in a neural network.
| Beginners | For the "One neuron" equation, reading just the "In plain words" part is enough. Make sure Watching behavior and Real vs. stand-in are solid |
|---|---|
| Advanced | Have students research and present methods that learn only some values on top of a wiring diagram, like Lappalainen et al. (2024). Check the papers they research in the original |
| Learn more | Sangsun Ahn, “Data Science for Business” lecture notes (data science overview, in Korean) · STEP [K-Digital] Natural Language Processing with AI · STEP [K-Digital] Fundamentals of Fintech Data Analysis |
| Instructor materials | Grading criteria for the check questions and sample answers for the assignments are on the Answer Key for Educators page (Special 3) |
You've read all of “Special 3: A Fruit Fly Brain in Minecraft.” Everyone in the lab has a few words to wrap it up.