The flight
The strip is the whole 360° world. The bright frame is the part the fly's eye covers, about 150° with one facet per 5°.
Loading the fly's brain…
Train the fly
The simple reflex is a rule I wrote by hand: turn toward whichever way the motion detectors say the world is moving. A trained decoder can do better. The fly watches four other worlds spin at random speeds while its brain stays exactly as published. Least-squares regression then learns 8 weights, one per motion-detector type, that turn their activity into an estimate of how fast the fly is spinning. The fly turns against that estimate.
Training and the test flights take about 15 seconds on a laptop. The flight pauses meanwhile.
Accuracy
Learned weights
How much each motion-detector type counts toward "the fly is turning right" (positive) or "turning left" (negative). In brackets: the direction of motion that type prefers.
The pattern makes physical sense: when the fly turns right, the world slides left across its eye, so the detectors that prefer leftward motion (T4a, T5a) learned to vote "turning right", and the rightward ones (T4b, T5b) "turning left".
Test flight
Inside the brain
Every square is one neuron, drawn where its column sits in the eye. Each panel is one cell type (all cells of a type share the same wiring). Click a panel to see its wiring and activity.
What's real here?
Real
The fly's visual system is the flyvis model from Lappalainen et al. (Nature, 2024): 45,669 neurons wired from its connectome, the same network as on the email page. Every response you see comes from simulating it.
Added for the simulation
The world, the wind and the steering rules. Only turning is simulated: no forward flight and no inertia. In a real fly, lobula plate cells pool the T4/T5 signals and descending neurons drive the wings. Those aren't in the model, so the simple reflex and the trained decoder stand in for them.
What to expect
Steering usually cuts the spin by 30–50%. The fly can't cancel it completely: its neurons react with a delay, and in strong wind the world moves faster than its motion detectors can track.
Model, weights and connectome: flyvis, MIT License © 2023 Janne K. Lappalainen, Fabian D. Tschopp, Mason McGill, Jakob H. Macke, Srinivas C. Turaga. This site isn't affiliated with the authors.