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), and what the spinal cord decides steers 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 legs. What comes out of the connectome is a walking speed and a turn — the stepping rhythm itself is a hand-written tripod gait, not neuron-by-neuron muscle control.
And in this default view the body is moved by that speed and turn directly, rather than being pushed along by its own legs. So the brain really does decide where the fly goes; the legs you see stepping are not what carries it there. There is a switch that turns the shortcut off — with it off, the connectome-driven fly pivots on the spot and covers almost no ground. The one thing that does walk on its legs is the trained policy below, and even that leans on a stabiliser.
Four real datasets, wired together.
The brain and the spine are joined by name, not by wire: a
command neuron called DNa01 in the brain is matched to the
neuron with the same name in the spinal cord. Biology motivates the
match — that cell really does keep its body in the brain and send its
axon down the cord — but the two maps come from two different flies (a
female brain, a male nerve cord), and no reconstructed connection
crosses between them. What crosses is a number: the brain neuron's
recent firing rate, averaged over its left and right copies and scaled
by a constant we picked, dropped into the spinal neurons that share its
name. The spiking on either side is real; the handoff is ours. Past the
spinal cord it changes again: the motor neurons set a walking speed and
a turn, the choice of forward or backward comes from a small hand-wired
spine rather than from the real one, and a hand-written leg rhythm does
the actual stepping.
There is also a second mode that hands the legs to a trained walking policy published with the body model. With the push we normally give the body switched off, the forward motion is genuinely the legs' doing — the fly covers 2.019 cm per simulated second against a 2.0 cm/s command, pushing off the ground. Staying upright is not: a stabiliser bleeds off the fly's pitch and roll on every physics substep, and with that switched off too it topples over and gets nowhere (0.068 cm per simulated second). The forward motion is earned; the balance is propped up. It is also worth being clear about what the policy is: a neural network someone trained with reinforcement learning, not the fly's own brain — the connectome plays no part in 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.
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:
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.
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:
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.
Other groups simulate fly brains too. None of them open in a tab.
- It's just a link. Comparable projects need Python, a GPU, and a setup hour. This needs one click.
- All three layers, wired together — brain and spine and body — not just brain plus body.
- Every shared run is reproducible. A replay URL re-executes the real neurons deterministically — anyone can verify, study, or remix it.
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:
webgpu-q ↗
The closest sibling. Browser-native quantum chemistry — Hartree–Fock, CCSD(T), DFT, EOM-CCSD — ported from PySCF and GPU-accelerated. Same "real science in a tab" thesis, different physics.
webgpu-dna ↗
Sister project: Geant4-DNA radiobiology — Monte-Carlo electron tracks, radiolysis chemistry, DNA-damage scoring — in the browser, within 0.985× of the reference. The 4D-viewer pattern came from here.
kernelfusion.dev ↗
The research umbrella. Single-kernel fusion for GPU workloads — collapsing per-dispatch overhead — which is exactly what makes a 140k-neuron LIF step feasible per frame here.
gpubench.dev ↗
"How fast is your GPU in the browser?" Real WebGPU compute tests across 592 devices and 7 vendors — the honest hardware baseline behind any number on this page.
neuropulse.live ↗
Watch a real 3.8B-parameter transformer think, tensor by tensor — every glow is a live activation read back from WebGPU. The same read-back-and-render idea as this fly's retina.
barisgunaydin.com ↗
The author's site — an index of every project, paper, and note behind this research line, plus contact. Ahmet Barış Günaydın, independent researcher.
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.