Fly runner

Can the looming escape reflex alone carry a fly through an endless obstacle course?

No training: the wiring aloneFruit fly escape circuit (FlyWire)
Loading 3D view…
Fly ·
livein your browser

What we measured

Real wiring
0 crashes in 90 s, 3 of 3 seeds, about 48 obstacles cleared
Rewired, same degrees
the same: 0 crashes. This game cannot tell the two apart
Random wiring, shuffled transmitters
24 to 26 crashes in 90 s

What happens

Our take on the viral “Fly Dino” experiment. Instead of a trained readout, this version uses nothing but the escape reflex of the real FlyWire escape circuit: an approaching obstacle grows on the fly's retina, LC4 and LPLC2 fire, and a Giant Fiber burst makes the fly hop.

The course speeds up over time. A hop that comes too early or too late ends the run, and a new run starts after a short pause.

An honest caveat: the degree preserving rewired circuit plays this game just as well. The game only needs a Giant Fiber that stays quiet at rest and fires when something looms, and the rewired circuit keeps both. The random circuits fail because their Giant Fiber never stops firing.

Inspired by: Fly Dino by Mert Cobanov (flydino.cobanov.dev). This is an independent implementation; no code from that project is used.

How the brain is wired to the world

The mapping is part of the experiment design. Everything between senses and motor output is the connectome.

Senses → neurons
  • Obstacle ahead, growing on the retina → LC4 and LPLC2
Neurons → movement
  • Giant Fiber (DNp01) above 60 Hz → hop

Dataset: Subcircuit of FlyWire v783: inputs LC4, LPLC2; outputs DNp01, DNp02, DNp04, DNp06, DNp11; paths with at least 20 synapses per step. About this dataset

Run it locally

Every experiment can also use the local runner, which simulates the brain on your own computer. It is required for connectomes too large for a browser.

git clone https://github.com/berkeyc/connectome-lab.git
cd connectome-lab
pip install -r local/requirements.txt
python local/runner.py            # listens on ws://localhost:8765

Then choose “Local runner” in the player controls and press Restart. Your browser may ask for permission to connect to a local device.