A fruit fly simulation detailed enough for Nature
DeepMind and Janelia built a MuJoCo fruit fly detailed enough to model neural sensorimotor control and serve as an RL testbed for locomotion and flight.

What it does
flybody is a full-body physics model of the fruit fly Drosophila melanogaster for the MuJoCo simulator. It packages the fly as a reinforcement-learning environment with tasks for walking imitation, flight, and vision-guided flight, supported by optional distributed training via Ray and DMPO agents. The model is anatomically detailed and intended as a platform for fruit fly biophysics and embodied sensorimotor research.
The interesting bit
The model treats insect locomotion as a high-dimensional control problem, with a 59-dimensional action space for walking alone. It is built with enough anatomical fidelity to appear in Nature and is meant to move fruit fly neuroscience from observation into embodied simulation.
Key highlights
- Anatomically detailed Drosophila model for MuJoCo physics
- RL environments for walking, flight, and vision-guided flight
- Distributed training support via Ray and DMPO agents
- Published in Nature (2025) by Google DeepMind and HHMI Janelia
- Tiered installation: core physics, ML inference extension, or full distributed training extension
Caveats
- Core installation excludes TensorFlow and Acme, so policy rollouts and training require opting into the ML or Ray extensions
- Rendering and GPU library paths may need manual environment configuration
- Scope is tightly focused on fruit fly biophysics; it is likely overkill for generic locomotion problems
Verdict
A strong choice for biomechanics and neuroscience researchers who need an embodied, physics-based fruit fly. If your RL research does not involve insects or biophysics, this is likely not your benchmark.
Frequently asked
- What is TuragaLab/flybody?
- DeepMind and Janelia built a MuJoCo fruit fly detailed enough to model neural sensorimotor control and serve as an RL testbed for locomotion and flight.
- Is flybody open source?
- Yes — TuragaLab/flybody is open source, released under the Apache-2.0 license.
- What language is flybody written in?
- TuragaLab/flybody is primarily written in Python.
- How popular is flybody?
- TuragaLab/flybody has 974 stars on GitHub.
- Where can I find flybody?
- TuragaLab/flybody is on GitHub at https://github.com/TuragaLab/flybody.