A real fly brain · in your browser · no install

You drive a fly by firing its real neurons.

Scientists mapped every neuron in a fruit fly's brain. This puts that whole map — plus its spinal cord and its body — live in your browser tab. Press a key, a real neuron fires, the spike spreads through the real wiring, and the fly walks. Nothing here is animated by hand.

▸ Launch the simulator How does it work?
needs a WebGPU browser (Chrome · Edge · recent Safari) — first visit streams ~300 MB, then it's cached
139,255
brain neurons
23,188
spinal-cord neurons
20M+
wired connections
67
body parts · real physics
The 30-second version

A whole animal nervous system, end to end, running on your GPU.

A real fly's brain was reconstructed neuron-by-neuron from electron microscopy — the FlyWire project. We loaded that exact wiring diagram into the browser and turn it into a living simulation: each neuron charges up, fires when it hits threshold, and passes the spike on to whatever it's connected to. The same rule, 139,255 times, every millisecond.

The brain talks to the fly's spinal cord (a second real connectome), which drives the legs of a physically simulated body. Press a key and you inject current into specific command neurons, then watch the consequences ripple all the way down to the feet. If the wiring says "this makes the fly walk forward," it walks forward. If it doesn't, it doesn't.

What's actually inside

Four real datasets, wired together.

01
Brain
FlyWire connectome — the full reconstructed brain of an adult fly: 139,255 neurons and ~15 million connections (Dorkenwald et al. 2024, Nature). Runs as a leaky integrate-and-fire network in a fused WebGPU kernel.
02
Spine
Janelia MANC connectome — the fly's ventral nerve cord, its "spinal cord": 23,188 neurons, 5.2 million connections. A second live network that turns brain commands into leg movement.
03
Body
TuragaLab flybody — a physically accurate fruit-fly model with 67 body parts and 111 muscles, simulated with real physics (MuJoCo) compiled to run in the browser.
04
Eyes
A tiny 64×16 retina rendered from the fly's own head position each frame, fed back into the brain's optic neurons — so the fly can actually see the target it's walking toward.

The brain and spine are joined the way real biology does it: a command neuron named DNa01 in the brain is the same cell as DNa01 in the spinal cord. No learned shortcuts — wire for wire from the real animal.

Straight about it

What this is — and what it deliberately isn't.

What it is

  • A whole-animal nervous system — brain, spine, and body — running end to end in a browser tab, no install.
  • Built from real, published data: two connectomes, a physical body model, and a trained policy, each peer-reviewed.
  • Reproducible by design — every shared run re-executes the same neurons deterministically.

What it isn't

  • Not a replacement for scientific simulators (NEST, Brian2, NEURON) — those are faster, more detailed, validated.
  • Not biophysically detailed: neurons are simple integrate-and-fire units — no ion channels or neuromodulation.
  • Not quantitatively validated whole-brain, and it runs slower than real time. Full list in LIMITATIONS.md.
How to play

Race the fly to the target, on as few spikes as you can.

Each key fires a famous descending neuron — a command cell that carries instructions from brain to body. Tap them to steer:

Q W forward E backward R turn A escape jump S looming dodge F backward (MDN) SPACE new round M science view

Reach the red target in the least time × fewest spikes. When you win, you get a replay link — whoever opens it watches the exact same simulation re-run: same target, your same keystrokes, against the same brain. You're sharing a brain trace, not a video.

How fast — honestly

Slower than real time. The only one behind a single URL.

The brain kernel is limited by memory speed, not math. We benchmarked it against the scientific standards on the same M2 Pro laptop — biological-time rate, higher is faster:

NEST 3.10 (C++)
0.67 kHz
Rust (multicore)
0.45 kHz
webgpu-fly
0.25 kHz

The original 1 kHz real-time target was unreachable for all three on that hardware — so we report what we measured, not what we hoped. The point was never "faster than NEST." It's a real fly brain on a phone in 30 seconds — the part the others can't do. Full disclosure in LIMITATIONS.md.

Why this one's different

Other groups simulate fly brains too. None of them open in a tab.

Part of a research line

One front of a broader effort: Geant4-class simulators, ported to WebGPU, in a browser tab.

webgpu-fly is built by Ahmet Barış Günaydın, an independent researcher. It shares its thesis — and its kernel-fusion and viewer machinery — with these sibling projects:

The honest part

This isn't the fastest fly-brain simulator — it's the most reachable one. It trades scientific completeness for a real connectome on a phone in 30 seconds. Treat it as a teaching, demonstration, and intuition-building tool — not a validated platform for publishing fly-brain dynamics.

The full, honest list of what's simplified, untested, or approximate — the performance ceiling, the LIF simplifications, the brain→spine→body approximations, the browser matrix — lives in LIMITATIONS.md.

Press a key. Fire a real neuron.

▸ Launch the simulator