DesktopFly brings a biologically accurate fruit fly to the macOS desktop
A new open-source app uses a 668-neuron simulation from the FlyWire connectome to drive virtual insect behavior.
Developer Denis Shiryaev has released DesktopFly, an open-source macOS application that places a 3D fruit fly on the user's desktop. The application moves beyond simple animation by powering the insect's behaviors through a live spiking simulation of a biological brain.
At the core of the app is a 668-neuron circuit featuring approximately 19,000 real synaptic connections derived from the FlyWire v783 connectome. The brain simulation operates as a 1 kHz leaky-integrate-and-fire (LIF) model, allowing the fly to perform complex actions such as walking and grooming. Notably, the fly's escape response is not a pre-written script; instead, it triggers only when the Giant Fiber (GF) neuron spikes in response to looming input from the user's cursor. The fly takes off only when that specific neuron spikes through its real synapses.
The Connectome Connection
The project leverages the FlyWire connectome, a massive collaborative effort by the FlyWire Consortium to map the entire brain of an adult fruit fly (Drosophila). While the full biological connectome contains over 139,000 neurons, DesktopFly implements a specific subset focused on visual detection, steering, and escape maneuvers. This allows the simulation to run efficiently on a consumer laptop while maintaining biological fidelity.
System Integration
DesktopFly integrates the virtual insect into the macOS environment through several system-level hooks. The fly treats the edges of open windows as physical ledges and reacts to the computer's thermal state, with a hotter Mac resulting in a faster-moving fly. The simulation also follows circadian rhythms, exhibiting activity peaks at dawn and dusk, a midday siesta, and nighttime quiescence. To provide deeper insight into the simulation, the app includes an interactive brain window where users can manually stimulate specific neurons to trigger corresponding physical reactions in the virtual fly.
Implications for Connectomics
This release demonstrates a practical shift in the field of connectomics, moving from static wiring diagrams to dynamic behavioral simulations. By mapping real neuronal spikes to virtual movements, the project provides a tangible way to visualize and interact with the complex circuitry of a biological brain. It serves as a proof of concept for how large-scale mapping projects can be translated into functional, interactive software.
What to Watch
As the FlyWire Consortium continues to refine the map of the Drosophila brain, future iterations of the simulation could potentially incorporate a larger percentage of the 139,000 available neurons. This would allow for more sophisticated behaviors and a more comprehensive representation of insect cognition on the desktop.