Back to list
DesktopFly: A macOS 3D Fruit Fly Powered by Real-Time FlyWire Connectome Neural Simulations
Open SourceNeurosciencemacOSArtificial Intelligence

DesktopFly: A macOS 3D Fruit Fly Powered by Real-Time FlyWire Connectome Neural Simulations

DesktopFly is an innovative open-source project that introduces a 3D fruit fly to the macOS desktop, driven by a live spiking simulation of the actual FlyWire connectome. Unlike traditional scripted animations, the fly's behaviors—including walking, grooming, and escaping the cursor—are governed by a 668-neuron circuit featuring approximately 19,000 real synaptic connections. Utilizing data from FlyWire v783, the application includes a "brain window" that renders 23,210 neuron soma positions. The fly's escape mechanism is biologically authentic, triggered by visual looming inputs that must overcome feedforward inhibition to spike the "Giant Fiber" neurons. This project represents a significant step in bringing complex computational neuroscience to consumer hardware, allowing users to interact with a digital entity controlled by biological neural logic.

Hacker News

Key Takeaways

  • Biologically Driven Behavior: The fly's actions are not scripted but emerge from a 1 kHz leaky-integrate-and-fire (LIF) simulation of real neural circuits.
  • FlyWire Integration: Uses 23,210 neuron soma positions from the FlyWire v783 dataset to render the fly's brain and drive its decision-making processes.
  • Complex Neural Circuitry: Features a 668-neuron circuit with ~19,000 synaptic connections, including specific neurons for vision, steering, walking, and grooming.
  • Interactive Escape Mechanism: The fly detects cursor movement as "looming" input, triggering an escape response only when specific biological thresholds are met.
  • Privacy-Conscious Design: The application requires no special macOS permissions or entitlements to sense the cursor, window frames, or thermal state.

In-Depth Analysis

The Neural Architecture of DesktopFly

At the core of DesktopFly is a sophisticated simulation of the fruit fly's central nervous system, specifically leveraging the FlyWire connectome. The application features a dedicated "brain window" that renders 23,210 real neuron soma positions out of the 139,255 available in the FlyWire v783 dataset. These neurons are visually organized and colored by "super-class," which represents FlyWire's coarse cell-type groupings. This allows users to see live spikes flashing at real neuron locations as the fly interacts with its environment.

The simulation runs at a 1 kHz frequency using a leaky-integrate-and-fire (LIF) model. This model incorporates a 668-neuron circuit with approximately 19,000 real synaptic connections. These connections are weighted by synapse counts and signed according to neurotransmitter predictions. The circuit is composed of several specialized groups:

  • Visual Detectors: 104 LC4 and 210 LPLC2 neurons act as looming-detector visual cells.
  • Command Neurons: Two Giant Fibers (GF/DNp01) serve as the primary escape command neurons.
  • Motor Control: Steering is handled by four DNa01 and DNa02 neurons, while forward walking is driven by two DNp09 neurons.
  • Specialized Movements: The "moonwalker" (backward walking) behavior is controlled by four MDN neurons, and grooming is managed by six DNg11 neurons.
  • Escape Maneuvers: Six neurons (DNp02, DNp04, and DNp11) handle wing-based escape maneuvers, supported by 330 of their strongest partners, including sensory and proprioceptive neurons.

Biological Realism in Digital Behavior

One of the most striking features of DesktopFly is that its behavior is entirely unscripted. The fly's interaction with the user's cursor is a direct result of biological simulation. When a cursor approaches, it is processed as looming input by the simulated LC4 and LPLC2 cells. The fly does not simply "flee" based on a proximity trigger; instead, it only takes off when the Giant Fiber actually spikes through its real synapses.

This process is moderated by approximately 1,200 synapses of feedforward inhibition. This biological detail explains why the fly might tolerate a slow approach by the cursor but will trigger an escape response in approximately 4 milliseconds if it detects a fast lunge. This mimics the survival instincts of a real fruit fly. Furthermore, because the FlyWire dataset focuses on the brain connectome rather than body geometry, the fly's physical form is procedural. It utilizes a tripod gait for walking, features visible wing-beats, and exhibits altitude-scaled flight, as well as specific postures for grooming and sleep.

Industry Impact

DesktopFly serves as a powerful demonstration of how high-fidelity neuroscience data can be integrated into interactive software. By moving beyond simplified AI models and utilizing actual connectome data, the project highlights the potential for "digital twins" of biological organisms. For the AI and research industries, this provides a template for visualizing complex neural dynamics in real-time on standard consumer hardware like macOS.

Moreover, the project's reliance on open-source data (FlyWire) and its accessibility (requiring only standard Xcode tools) lowers the barrier for students and researchers to explore computational neuroscience. It suggests a future where biological simulations could replace traditional heuristic-based animations in user interface design or educational tools, providing a more authentic representation of life-like behavior.

Frequently Asked Questions

Question: What are the hardware and software requirements to run DesktopFly?

DesktopFly requires a Mac running macOS 13 or later. Users must also have Xcode Command Line Tools installed (Swift 5.9 or higher) to build the project from the GitHub repository.

Question: Does the application require access to my screen or personal data?

No. According to the developer, the application requires no special permissions or entitlements. It senses the cursor position, window frames, and thermal state using permission-free system calls, ensuring user privacy while maintaining interactivity.

Question: Can users interact with the fly's brain directly?

Yes. The application includes a brain window where users can see 23,210 neuron soma positions. Users can click on any region within this window to stimulate the neurons and observe the resulting live spikes and behavioral changes.

Related News

Anthropic Launches Official Claude Code Plugins Directory on GitHub to Curate High-Quality AI Extensions
Open Source

Anthropic Launches Official Claude Code Plugins Directory on GitHub to Curate High-Quality AI Extensions

Anthropic has officially launched the claude-plugins-official repository on GitHub, establishing a curated, first-party-managed directory of high-quality plugins designed for Claude Code. As agentic AI coding assistants become increasingly integrated into modern software engineering workflows, the need for standardized, dependable, and vetted extensions has grown critical. Managed directly under the anthropics GitHub organization, this dedicated catalog provides developers with an authoritative destination to discover quality-assured extensions that expand Claude Code's capabilities. By introducing an official registry, Anthropic addresses developer demands for ecosystem reliability, consistent integration standards, and secure extensibility. This move highlights a major step toward mature agentic development environments, helping engineering teams streamline workflows with confidence.

K-Dense-AI Releases Scientific Agent Skills Repository to Transform AI Agents into Automated Scientists
Open Source

K-Dense-AI Releases Scientific Agent Skills Repository to Transform AI Agents into Automated Scientists

K-Dense-AI has introduced scientific-agent-skills, a trending open-source repository designed to transform standard artificial intelligence agents into scientific researchers. Recognized as the leading scientific Agent Skills library worldwide, the project reports adoption by more than 250,000 scientists globally. The collection provides 177 out-of-the-box verified agent skills combined with access to over 100 scientific databases. These resources span key domains including biology, chemistry, medicine, and drug discovery. Engineered for seamless tool integration, the repository is compatible with major AI developer environments and platforms, including Cursor, Claude Code, Codex, and Pi. By bridging specialized scientific databases with verified procedural skills, the project equips developers and researchers with standardized capabilities for computational scientific investigation.

ECC Launches Agent Harness Performance Optimization System for Claude Code, Codex, OpenCode, and Cursor
Open Source

ECC Launches Agent Harness Performance Optimization System for Claude Code, Codex, OpenCode, and Cursor

ECC, an open-source project by developer affaan-m, has introduced an agent harness performance optimization system designed to significantly enhance modern autonomous programming tools. Engineered to support Claude Code, Codex, Opencode, Cursor, and related environments, ECC introduces a comprehensive operational layer focused on five foundational capabilities: procedural skills, engineering intuition, persistent memory, proactive security, and research-first development methodologies. By addressing performance bottlenecks within developer agent harnesses, the system bridges the gap between raw model intelligence and real-world software engineering requirements. This architectural release enables autonomous coding agents to execute complex, multi-stage engineering tasks with improved context retention, enhanced codebase safety, and cross-platform consistency across leading AI-assisted programming environments.