RC RANDOM CHAOS

Desktop pet fly runs a live simulation of the real Drosophila connectome

· via Hacker News

Original source

A 3D fruit fly on macOS desktop powered by the real FlyWire connectome

Hacker News →

A new open-source macOS app puts a 3D fruit fly on your desktop, but the novelty is what’s under the hood: its behavior is driven by a live spiking-neuron simulation built from FlyWire’s v783 connectome, the real wiring diagram of an adult Drosophila brain. A 668-neuron circuit with roughly 19,000 measured synaptic connections runs as a 1 kHz leaky-integrate-and-fire model, covering looming-detection visual neurons, the Giant Fiber escape command neuron, and dedicated cells for steering, walking, grooming, and backward locomotion. A companion window renders 23,210 actual neuron positions and flashes spikes at their real locations, and clicking a region ‘optogenetically’ stimulates nearby neurons to see what the network does downstream.

The escape response isn’t scripted. Moving your cursor toward the fly feeds looming input into the real LC4/LPLC2 cells, and takeoff only fires when the Giant Fiber actually spikes through its synapses — including roughly 1,200 feedforward-inhibitory connections that tolerate slow approaches but trigger a ~4 ms escape on a fast lunge, matching the live animal. The interaction loop closes both ways: window edges become ledges, appearing windows drive the looming pathway, clicks register as substrate taps, and the leg gait feeds proprioceptive neurons back into the circuit. The fly also follows a circadian rhythm and speeds up when the Mac runs hot, since flies are ectotherms.

The author is candid about the modeling boundary: FlyWire supplies wiring only, so the LIF dynamics, neurotransmitter signs, gap-junction coupling, synaptic delays, and cursor-to-looming transduction are conventional choices layered on top of the real graph, while everything about who connects to whom is genuine data. The body geometry is procedural because the connectome contains no anatomy. Code is MIT-licensed; the derived FlyWire data is CC BY-NC 4.0 with citation requested. Notably, it needs no permissions or entitlements — it senses cursor position, window frames, taps, and thermal state through permission-free APIs, and its keystroke sensing detects only that a key was pressed, never which one.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.