closed-loop-fly · one frame of the loop

Vision drives the wiring, the wiring drives the wings, the wings move the eye

Every 16.7 ms of fly time, in a browser tab. Two published networks joined at their MaleCNS body IDs, nothing fitted in between.
luminance 1,771 × 2 signals HS · LC4 · LPLC2 rates current, same neuron DN spikes wing forces the head moves, the image changes 1 · render the world from the fly's head 6 cube faces Three.js · pillar course, drum, ground 2 · the compound eye 1,771 ommatidia one per connectome column · adaptation + low-pass 3 · optic lobe [A] 65,799 units fitted rate net · reads HS, LC4, LPLC2 4 · the bridge 317 neurons rate → current, by body ID 5 · the whole central nervous system [B] 166,700 neurons · 124M synapses MaleCNS · leaky integrate-and-fire on WebGPU · 160 ticks a frame 6 · descending neurons → wings DNa02 left / right → wing amplitudes → thrust, yaw, bank 7 · the body moves rigid body yaw rate → 205 haltere afferents one frame = 16.7 ms of fly time ≈ 95 ms of wall time on an RTX 3070 · 0.17× realtime both networks in one web worker · deterministic frame clock
Xenova/fruit-fly-simulation (whole CNS, LIF, WebGPU) · AbijahKaj/fruit-fly-brain-research (optic-v2, eye) · MaleCNS connectome, Janelia
github.com/ZeroXClem/closed-loop-fly