DenisSergeevitch/desktop-fly
A 3D fruit fly living on your macOS desktop, driven by a live spiking simulation of the real FlyWire connectome
What it solves
DesktopFly creates a virtual 3D fruit fly that lives on your computer desktop, acting as a living visualization of real neural circuitry. It bridges the gap between complex connectome data (the map of neural connections in a brain) and observable behavior by simulating how specific neurons drive physical actions like walking, flying, and grooming.
How it works
The project uses real-world brain wiring data from the FlyWire and MaleCNS datasets to power a spiking neural simulation.
- Neural Simulation: It runs a leaky-integrate-and-fire (LIF) simulation of thousands of neurons. For example, it simulates a 668-neuron circuit for high-level brain functions and a 1,045-neuron locomotor circuit for leg movement.
- Sensory Integration: The fly reacts to your desktop environment. It treats window edges as ledges to land on, views moving windows as "looming" threats, and interprets mouse clicks as physical taps or keyboard typing as vibrations.
- Physical Body: The neural spikes are translated into motor commands that drive a procedural 3D body. In the MaleCNS implementation, simulated motor activity drives articulated joints and foot-contact feedback.
- Interactive Brain: Users can open a window showing the fly's brain in real-time, where they can click regions to "optogenetically" stimulate neurons and observe the resulting behavior.
Who it’s for
This is for enthusiasts of neuroscience, robotics, and biological simulation who want to see connectome data in action, as well as users who enjoy unique, interactive desktop pets.
Highlights
- Grounded in Real Data: Uses actual neuron positions and connection counts from the FlyWire and MaleCNS datasets.
- Environmental Awareness: Reacts to macOS window frames, cursor movement, and system thermal state (hotter Macs make the fly move faster).
- Cross-Platform: Available natively for macOS and via an Electron port for Windows.
- Biologically Inspired: Simulates specific pathways, such as the Giant Fiber (GF) for escape responses and the MDN for backward walking.
Related
- Project
- Project
- Project
- Project