A practical guide to fly brains

What is a fly brain, and what can it do now?

Explore wiring. Stimulate neurons. Control a body. Try a game. Pick a goal and follow the visual steps.

Pick a goalSee how it worksFollow 3 steps

What would you like to try?

Illustrations are schematics. Start with wiring exploration if you are unsure.

How it works

Wiring needs rules to become a model

A connectome records connections between nerve cells, or neurons. Synapses are the contact points through which cells transmit signals.

Simulating activity also requires signal strengths and firing rules. Controlling a body or game adds another design choice: how inputs and neural activity map to actions.

Listed data examples: FlyWire / MaleCNS

A measured wiring diagram plus a chosen dynamical model makes a running fly brain MEASUREDWiring — which neuron, to which, how many+CHOSENSignal strengths and firing rules=A running "fly brain"
What runs is measured wiring plus a model somebody chose.

Different ways to build a fly-brain project

What is simulated: the brain, the body, or both?

Among listed examples, mapping neural output to game controls is a recurring approach. Some projects also couple a neural model to a simulated fly body.

This is a qualitative reading of listed descriptions and representative implementations, not an exhaustive count or a field-wide ranking.

Brain controls a game

Brain
Whole network or a subcircuit
Body
Fly body omitted
  1. Game images
  2. Neural model
  3. Game controls

Fly64 maps neural activity to Mario controls. Fly legs and muscles are not simulated; the input and output mappings are designed by the author.

Example: Fly64

Experiment on the brain

Brain
Simulated neural activity
Body
No body needed
  1. Stimulate / silence
  2. Neural model
  3. Spike records

Stimulate or silence cells and examine spike times and rates. Circuit responses can be compared without moving a body.

Example: Shiu model

Control a body with an artificial policy

Brain
Whole-brain model not required
Body
Body physics simulated
  1. Artificial controller
  2. Body in MuJoCo
  3. Posture / contact

A controller supplies actions to body and locomotion environments. Reinforcement learning can be used to train the controller.

Example: flybody

Couple brain and body simulations

Brain
Simulated neural activity
Body
Body physics simulated
  1. Neural model
  2. Action mapping
  3. Body in MuJoCo

Fly.exe couples its brain to a NeuroMechFly body. A separate pattern generator supplies the gait; measured wiring does not directly generate every leg movement.

Example: Fly.exe

Drive a physical robot

Brain
Simulated subcircuit
Body
Physical hardware
  1. Camera input
  2. Neural subcircuit
  3. Real motors

NeuroHex maps escape-circuit output to servos. Its leg movements use a programmed gait.

Example: NeuroHex

A separate question

Which part learns?

The choice of brain or body model is separate from the choice of what to train. These examples label the component that training adjusts.

No training

  1. Neural circuit
  2. Fixed mapping
  3. Game action

What is trained: None

Activity changes, but gameplay experience does not train better control.

Example: Fly64

Train the readout

  1. Fixed circuit
  2. TRAINEDAction readout
  3. Game action

What is trained: Action readout

Train the mapping from activity to actions such as jumping. Fly Dino keeps its neural subcircuit fixed.

Example: Fly Dino

Train a body controller

  1. Observations
  2. TRAINEDArtificial controller
  3. Body actions

What is trained: Artificial controller

Learn control in reinforcement-learning tasks. This need not involve training a measured whole-brain network.

Example: flybody

These three examples are not an exhaustive taxonomy. Other implementations, such as the visual model flyvis, combine wiring constraints with model training. flyvis →

From an idea to your first experiment

Each route starts with one tool and walks you through an initial experiment.

Explore the wiring

What you can do

Choose a cell and trace which other cells it connects to.

Schematic · not a screenshot or experimental result
INPUTSearch for cells
PROCESSExplore wiring
RESULTFind connections

Try it · 3 steps

Before you startBrowser + Google sign-in. No Python setup needed.

  1. Open the official site

    Use the project page below, sign in and select FlyWire FAFB.

  2. Search a cell type

    Try T4a in the search field and inspect the matching cells.

  3. Open a cell

    Inspect the selected cell and its input and output connections.

Start with FlyWire Codex

Project page → Official website

More about the tools for this route

FlyWire Codex

A browser entry point for exploring FlyWire neurons and annotations.

Features, first steps and limits
Features
Explore and analyze cells and annotations in a web application, with code for local hosting.
Input → output
Choose cells to investigate → inspect their information and connectivity.
What you need
A browser and Google sign-in for interactive exploration; Python and prepared data for local hosting.
First step
Open the official site from its project page. For local hosting, follow the README data setup and launch steps.
Scope and limits
A tool for exploring structure and annotations; activity over time requires a simulation model.

Sources checked:

neuprint-python

Retrieve neuPrint data from Python for repeatable analysis.

Features, first steps and limits
Features
Query neurons and connections, then work with the returned tables.
Input → output
Dataset and query criteria → neuron or connection tables for further analysis.
What you need
Python, a server, a dataset and an authentication token.
First step
Follow the official Quickstart: create a Client and try the fetch_custom query.
Scope and limits
Queries cover the data served by the chosen instance. Retrieved wiring alone does not generate activity or behavior.

Sources checked:

Simulate activity

What you can do

Change neural stimulation and compare the resulting spikes.

Record spikes
Schematic · not a screenshot or experimental result
INPUTSet a stimulus
PROCESSRun the circuit
RESULTRecord spikes

Try it · 3 steps

Before you startPython notebook skills. The README also describes a Colab route.

  1. Open the example

    Follow the repository README to Colab or open example.ipynb locally.

  2. Run the baseline

    Match the data release and settings, then inspect spike times and rates.

  3. Change and compare

    Change stimulation or silencing, rerun and compare with the baseline.

Start with Shiu model

Project page → Repository README / example.ipynb

More about the tools for this route

Shiu et al. / Drosophila_brain_model

Stimulate cells and compare activity with a silenced-cell condition.

Features, first steps and limits
Features
Activate or silence selected neurons. LIF models accumulate input and fire above a threshold.
Input → output
FlyWire IDs, stimulation rates and silenced cells → spike times and rates.
What you need
Python, Brian 2, Jupyter and connectivity data; a Colab route is also available.
First step
Try example.ipynb and configure the intended data release.
Scope and limits
Silencing zeros connections to and from selected cells. Model predictions require comparison with biological observations.

Sources checked:

flyvis

Investigate how a fly visual-system model responds to light and moving edges.

Features, first steps and limits
Features
Use pretrained models, supply custom stimuli or train models; tutorials cover flashes and moving edges.
Input → output
Visual stimuli or movies → modeled visual-neuron responses.
What you need
Python and PyTorch; official tutorials include Colab notebooks.
First step
Try Flash Responses, then move to Custom Stimuli.
Scope and limits
Models the visual system. Training is combined with wiring constraints, so this differs from fixed-network demos.

Sources checked:

Control a body

What you can do

Send actions to virtual legs and observe changes in posture.

Schematic · not a screenshot or experimental result
INPUTSupply actions
PROCESSSimulate physics
RESULTObserve posture

Try it · 3 steps

Before you startPython + MuJoCo. Begin with body visualization and control.

  1. Prepare the environment

    Follow the README core installation and open the tutorial notebook.

  2. Display the body

    Create the walking environment and render an image to check the model loads.

  3. Try control actions

    Advance env.step(action) and inspect posture. Walking requires a controller.

Start with flybody

Project page → README installation / tutorial notebook

More about the tools for this route

flybody

Test leg and wing control in a virtual body, including locomotion learning tasks.

Features, first steps and limits
Features
MuJoCo body model, walking imitation, flight and vision-guided flight tasks, plus training code.
Input → output
Body control actions → simulated posture, movement and rendered images.
What you need
Python and MuJoCo; policy execution and training require extra machine-learning dependencies.
First step
Open the tutorial notebook, display the body and try actions in a walking environment.
Scope and limits
Supplies a body and tasks. A controller is required; installation does not automatically connect a measured whole brain.

Sources checked:

NeuroMechFly / FlyGym

Combine a virtual body and environment to study sensorimotor control.

Features, first steps and limits
Features
Body physics, scene composition and an interactive viewer. NeuroMechFly research includes vision, smell and walking.
Input → output
Environment and body control → motion and sensory input; sensory support depends on the version.
What you need
Python and matching dependencies. Current FlyGym and legacy flygym-gymnasium have different APIs.
First step
Use current documentation, or match legacy tutorials with the legacy environment.
Scope and limits
Not all legacy features are ported. Reconstructing a body and modeling an entire brain are separate tasks.

Sources checked:

Try a game

What you can do

Watch circuit signals turn into a chess move.

Read out a move
Schematic · not a screenshot or experimental result
INPUTEncode the board
PROCESSRead circuit signals
RESULTChoose a move

Try it · 3 steps

Before you startWebAssembly-capable browser. Connection data loads on first use.

  1. Open the public demo

    Follow the official website link and wait for the connection data to load.

  2. Try a game

    Use the board and inspect moves and activity records. Playing strength is limited.

  3. Compare a disconnected circuit

    Try the disconnected-synapse control and inspect activity and move selection.

Start with Fly Chess Lab

Project page → Official website demo

More about the tools for this route

Fly Chess Lab

Play in a browser and observe the link between neural signals and chess moves.

Features, first steps and limits
Features
Board, neuron point cloud, activity records, move scores and a disconnected-synapse control.
Input → output
Board encoded as stimuli → circuit signals projected into move scores.
What you need
A browser supporting WebAssembly and related APIs; data loads initially and computation stays in the browser.
First step
Open the official demo from its project page; compare activity with the disconnected control.
Scope and limits
The untrained readout plays weakly. Human-designed input and output mappings do not demonstrate fly understanding of chess.

Sources checked:

How to interpret the results

What you can test

  • Compare circuit responsesChange stimulation or silencing and inspect model output.
  • Experiment with control and trainingTry the tasks each implementation supports, such as visual-model training or body control.

What results alone do not establish

  • Every model learns on its ownFixed-network demos and trained models coexist. Check which parts are trained.
  • A complete living fly has been reproducedGame scores or body motion alone do not establish agreement with real neural activity.

Check what a number counts: cells, connected cell pairs and total synapses are different quantities. Release and filtering choices can change counts within the same dataset.