Richard Jeevash

DigitalFly

A virtual fruit fly you can poke. A simulated fly walks toward what it sees, steered by a brain you can inspect, silence and tune.

Move a green target and watch the fly turn and walk toward it. Then open up its brain, switch parts of it off, and see what changes. It all runs on your own computer, in your browser.

DigitalFly on GitHubGetting started

The DigitalFly workbench: a live render of the simulated fly, stimulus controls, interventions and neural activity traces

The workbench: the fly, the target, the interventions and its neurons, live.

What you can do

  • Run the loop. Move the target; the fly turns and walks to it. You can look through its own compound eyes.
  • Swap the brain. Six hand-built units with every weight visible, or circuits wired from the FlyWire connectome, with rate or spiking neurons.
  • Intervene. Silence a sensor, a steering neuron or any cell type, and watch how the walk changes.
  • Build a circuit. Pick any FlyWire cell types as seeds and grow a circuit around them, up to the whole brain.
  • Compare with a real fly. Import a published recording of both DNa02 neurons in a walking fly, and fit turning against them side by side with the model.

How it works

SEEThe target’s bearing, or the rendered compound-eye image.

THINKSix rate units, or a FlyWire circuit, turn it into a left/right command.

WALKA walking controller and MuJoCo physics move the body, and the loop starts again.

Physics runs every 0.1 ms, the neurons every 1 ms. A run is deterministic for its seed, so saved experiments replay exactly.

Why “frankenfly”

It is stitched together from parts: a female fly’s physics body (NeuroMechFly), brain scans of two different flies, and a choice of brains. In the connectome brains, who connects to whom is real data, but each connection’s sign is assumed from its predicted transmitter, and the wiring to the eyes and legs is engineered.

What it is not

An engineered model, not an uploaded or validated fly brain. It has been compared with one recorded fly, not fitted to it. Some circuits steer with a strong left-turn bias. Results show what these models compute, not established fly biology.

Try it

git clone https://github.com/Jeevash23/frankenfly.git
cd frankenfly
./scripts/setup.sh
./scripts/start.sh --open

You need Python 3.12 and Node.js 22.12 or newer. The code is open source under Apache-2.0; the FlyWire-derived data keeps its own licence (CC BY-NC 4.0, non-commercial).