Flymagotchi.

Drosophila melanogaster · FlyWire v630 · running live on this page

Your pet's brain is not made up.

Give it sugar. Twenty-one taste neurons fire, the signal crosses a circuit traced from a real fly by electron microscope, and the proboscis comes out — because MN9, the motor neuron that extends it, just fired.

0 HzMN9 · urge to eat
0neurons firing
0excitatory
0inhibitory

Each dot is a neuron, each line a synapse. Click a neuron to silence it and watch MN9.

Fig. 1 The feeding circuit, simulated in your browser at roughly fifty times real time. Nothing here is pre-recorded.
127,400neurons in the connectome
448that fire when it tastes sugar
20,901synapses between them
20 mscpu per second simulated
0.0 ms / waiting for sugar
Fig. 2 One bite, slowed down about sixteen times. Each travelling dot is a single spike crossing a single synapse — blue excites the neuron it lands on, pink inhibits it. The gold neuron is MN9. It takes roughly forty milliseconds for sugar at the mouthparts to become a decision to eat. This is anatomy: every neuron sits where it really sits in the head, over a backdrop of 26,000 others — the two optic lobes at the sides, the central brain between them. The action happens low and in the middle because that is where taste arrives: the subesophageal zone, right above the mouthparts. 85% of the circuit has a measured position; the remaining 67 neurons are placed among the neighbours they connect to.

A wiring diagram of an entire brain

A connectome is a map of every neuron and every synapse between them. For the adult fruit fly it took a decade: the brain was sliced into thousands of sections, imaged by electron microscope, and every neuron traced through the stack by machine learning and human proofreading. The result — 127,400 neurons, 14,687,178 synapses — is the first complete wiring diagram of an adult animal brain, and it is public.

A wiring diagram is not a working brain, though. It says who talks to whom, not what they say. To get behaviour out of it you need a model of what each neuron does.

The model

Every neuron here is a leaky integrate-and-fire unit, about the simplest useful neuron there is. It holds a voltage. Input pushes it up. Left alone it leaks back down. Cross a threshold and it fires, dumps its charge and goes briefly deaf.

dv/dt = (v_rest − v + g) / 20 ms membrane voltage, leaking back to −52 mV dg/dt = −g / 5 ms synaptic input, decaying fire when v > −45 mV then reset, deaf for 2.2 ms

Each synapse carries a weight set by how many contacts the two neurons actually make in the electron microscopy, and a sign: acetylcholine excites, GABA and glutamate inhibit. Nothing is trained. The wiring is what it is.

Why 448 neurons and not 127,400

Because when sugar touches the fly's mouthparts, only 448 neurons ever fire. The other 127,000 sit at rest, and a neuron at rest sends no current to anyone. So you can drop them without changing the answer — which is a claim, so it was tested (Fig. 2).

The part worth staring at

Roughly a third of the interneurons in this circuit are inhibitory. They exist to stop the fly eating. A brain that only knew how to say yes would eat until it died, so most of the machinery between this is sugar and extend the proboscis is machinery for saying no, or not yet, or not this much.

That single fact is why this is a game. On install you get a seed, and the seed silences 40 neurons. Sometimes you knock out neurons that were carrying the signal, and your fly is a poor eater. Sometimes you knock out the brakes, and your fly eats better than a normal one. Across eight consecutive unselected seeds: two better, three worse, three unchanged. Nobody designed that distribution.

The claims, and how they were checked

Dropping 99.65% of a brain and expecting the same behaviour deserves evidence. Full model against reduced model, four conditions, three random seeds each, measuring MN9:

ConditionFull modelReducedΔ
unmutated68.0 Hz67.3 Hz−0.7
mutant A34.7 Hz31.7 Hz−3.0
mutant B94.0 Hz88.7 Hz−5.3
mutant C115.3 Hz111.7 Hz−3.7

Fig. 2All within 2σ of the model's own noise, and the ranking between mutants is preserved. There is a consistent bias: the reduced circuit runs about 4% quieter.

And the simulator itself

The JavaScript here is a reimplementation, so it was calibrated against the original Brian2 model using the same silenced neurons: 4.7% maximum deviation across four conditions and ten seeds, with the signs mixed, so no systematic bias. It runs at about fifty times real time on one core.

What is real, and what is not

This matters more than anything else here, so it goes before the fun parts.

Real — computed live

  • The 448 neurons and 20,901 synapses, from FlyWire v630
  • The Shiu et al. leaky integrate-and-fire model, unchanged
  • MN9 in hertz, and the proboscis that follows it
  • The excitatory / inhibitory split, live
  • Your mutation, and how much worse or better it makes your fly

Not real — game or drawing

  • The hunger clock. A number that grows with time
  • The walk and the wingbeat: good animation, but animation
  • The artwork, which is AI-generated illustration, not micrographs
  • The network layout, which groups neurons by who they talk to, not by where they sit in the head

Things to try, in the panel above

  1. Find a brake. Silence neurons one at a time while feeding it. Most do nothing. A few drop MN9 hard — those were carrying the signal. A few make it rise: you just removed an inhibitory neuron.
  2. Kill the input. Silence the green dots. How many sugar sensors can you remove before it stops eating? More than you would guess.
  3. Find the bottleneck. Is there a single neuron that ends feeding altogether?
  4. Compare the two kinds of damage. An excitatory neuron and an inhibitory one fail in opposite directions.

Getting the extension

Not on the Chrome Web Store yet. Clone the repo, open chrome://extensions, turn on Developer mode and load the folder unpacked. It installs asking for zero browsing permissions — the fly lives in the side panel until you press Let it out on the web, and then it walks over the pages you read and bolts if you move the pointer at it too fast.