Lab / Swat the Fly
a fly brain, running live

Swat the Fly

loading
0caught
0escaped
eyes quiet · Giant Fiber quiet
lab

A cartoon fly you can't quite hit, because its decision to jump comes from a simulation of its real escape circuit, wired the way a real fruit fly's brain is wired.

Try it

Real fly: hard. Scrambled fly: easy. Same neurons, shuffled wiring. Play both before reading anything.

What's actually running

987NEURONS
15,096CONNECTIONS
0.1 msPER STEP
1.2 MBTOTAL DOWNLOAD

Those neurons and connections are lifted from the FlyWire connectome, a complete map of an adult fruit fly's brain. The shadow of your hand drives the looming detectors, cell types called LC4 and LPLC2. They feed the Giant Fiber, the fly's escape command neuron. When it fires, the fly jumps. That decision is simulated live in your browser, a tenth of a millisecond at a time.

What isn't

The jump itself is animation. The last relay, Giant Fiber to leg muscle, is a fixed 0.93 ms delay taken from a paper, because that step happens below the brain and FlyWire only maps the brain. How your hand's shadow turns into neural drive is a design choice tuned for play, not measured biology.

The result worth caring about

Rewire the whole brain at random, keeping every neuron, every connection count and every excitatory and inhibitory sign, and the Giant Fiber never fires. Not once, at any speed, across every seed I tried. The brain isn't silent: it's about five times quieter and still firing thousands of spikes a second. The signal just never arrives. The real wiring concentrates activity onto one cell. Random wiring spreads it thin.

How I know the simulation is right

The model is published, and so are its predicted firing rates for fifteen named neurons. Running that protocol through this engine lands within 6% of their numbers, with a correlation of 0.967 across the set.

The brain panel under the game shows the real spikes as they happen, and the lab switches let you break the circuit yourself. Turn the Giant Fiber off and the fly becomes a fly that can't see you coming. Cut the direct eye-to-Giant-Fiber wires and it still sometimes jumps, because the signal has other routes.

Sources