explainx.ai0k
TrendingNewsPathwaysSkills
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

follow on google

Add explainx.ai as a preferred source

corporate training

support@explainx.ai

get started

Find your pathTake Free Evaluation

learn

mind: share how you thinkpathways — start freeworkshopsbootcampscoursescertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcptoolsmdx readeragentsllmsdesignsdictionaryagi trackerfelony benchranks

company

aboutvisionmissionteaminstructorsteach on explainxpartnershipscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource libraryfor LLMsexplainx.ai kids

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportcontactprivacytermsdata rightshow we create contentsubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

On this page

  • TL;DR
  • What flybody actually models
  • Getting started
  • Why a fruit fly body model matters for AI research
  • What people are asking
  • Citing the work
  • The takeaway
  • Related on explainx.ai
← Back to blog

explainx / blog

flybody: The Fruit Fly Body Model DeepMind Built for MuJoCo

MuJoCo, Reinforcement Learning, DeepMind, Robotics Simulation, Open Source

flybody is DeepMind and Janelia's fruit fly body model for MuJoCo. What it does, how to install it, and why it trains RL insect locomotion.

Sep 12, 2026·7 min read·Yash Thakker
add explainx.ai
go deep
flybody: The Fruit Fly Body Model DeepMind Built for MuJoCo

Most reinforcement learning benchmarks for legged locomotion use bodies that don't exist in nature — MuJoCo's Ant and Humanoid are convenient abstractions, not biology. flybody takes the opposite approach: it's an anatomically detailed simulation of an actual animal, the fruit fly Drosophila melanogaster, built so researchers can train real control policies on a real (simulated) nervous system's worth of joints and muscles.

The project comes from a collaboration between Google DeepMind and HHMI Janelia Research Campus, and the underlying science was published in Nature in 2025 as "Whole-body physics simulation of fruit fly locomotion" by Roman Vaxenburg and 12 co-authors. The repository has drawn 675 GitHub stars and 86 forks — modest by AI-tooling standards, but notable for a computational neuroscience release, and a signal that the sim-to-behavior approach is resonating past its original lab.

TL;DR

table · 2 cols
QuestionAnswer
What is it?An anatomically detailed Drosophila body model for the MuJoCo physics engine
Who built it?Google DeepMind + HHMI Janelia Research Campus
Where was it published?Nature, 2025 (Vaxenburg et al., "Whole-body physics simulation of fruit fly locomotion")
Is it free?Yes — Apache-2.0 license
What do I need?Python 3.10, conda, MuJoCo; GPU optional unless training at scale
What can I train?Walking imitation, flight, and vision-guided flight RL policies
How do I train at scale?A Ray-based distributed script running DeepMind's DMPO agent
Latest releasev0.1.0

What flybody actually models

The fly body in this repo isn't a stylized six-legged robot — it's built from the Drosophila's real exoskeleton geometry, joint arrangement, and muscle-actuator dynamics, rendered as a MuJoCo XML model (fruitfly.xml, plus a floor.xml variant) you can drag straight into MuJoCo's simulate viewer with no code at all. The included fly-white.png and the paper's figures show collision geometry down to individual leg segments, something a generic legged-robot MuJoCo model never bothers with because it doesn't need to match a real animal's mechanics.

That level of fidelity is the whole point. A world model trained to predict pixels doesn't have to get muscle torques right; a body model built to test hypotheses about how a fly's nervous system controls its own body does. flybody sits closer to physical simulators like NVIDIA's Cosmos physical-AI world models in spirit — physics-grounded, not just visually plausible — but scoped to one specific, extremely well-studied organism instead of general robot embodiments.

Getting started

Installation follows a standard conda + pip pattern, with three install tiers depending on how much of the stack you need:

bash
git clone https://github.com/TuragaLab/flybody.git
cd flybody
conda create --name flybody -c conda-forge python=3.10 pip ipython cudatoolkit=11.8.0
conda activate flybody
table · 3 cols
Install modeCommandWhat it gets you
Corepip install -e .The fly model + task environments, no ML dependencies
ML extensionpip install -e .[tf]Adds Tensorflow + Acme for running/inference of trained policies
Ray extensionpip install -e .[ray]Adds Ray for distributed policy training across workers

Drop the -e flag for a non-editable install, or install directly from the remote repo (pip install git+https://github.com/TuragaLab/flybody.git) without cloning first.

Once installed, interacting with the fly is a few lines of Python:

python
import numpy as np
import mediapy

from flybody.fly_envs import walk_imitation

# Create walking imitation environment.
env = walk_imitation()

# Run environment loop with random actions for a bit.
for _ in range(100):
   action = np.random.normal(size=59)  # 59 is the walking action dimension.
   timestep = env.step(action)

# Generate a pretty image.
pixels = env.physics.render(camera_id=1)
mediapy.show_image(pixels)

That 59-dimensional action space is worth pausing on — it's a rough proxy for how many independently actuated degrees of freedom the fly's legs require just to walk, versus the handful of joints a typical legged-robot RL benchmark uses. The repo also ships a Colab tutorial notebook covering the walking, flight, and vision-guided flight task environments, and a Ray-based distributed training script that runs DeepMind Acme's DMPO agent across parallel workers for anyone training a policy from scratch rather than just poking at random actions.

Weekly digest3.5k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP — delivered to your inbox. Unsubscribe anytime.

Why a fruit fly body model matters for AI research

Embodied neuroscience, tested in simulation. The core research question isn't "can an agent walk" — plenty of MuJoCo benchmarks already answer that — it's whether a biologically accurate control policy, trained the way a real fly's motor system might operate, reproduces real fly behavior. That's a much harder and more interesting bar than clearing a locomotion benchmark, and it's only answerable if the simulated body's mechanics actually match the organism's.

A testbed for sensorimotor control, not just locomotion. flybody ships flight and vision-guided flight environments alongside walking, which means the same body model supports multiple sensorimotor modalities — a fly deciding how to fly based on what it "sees" is a different, harder RL problem than a legged robot walking on flat terrain, and it's the kind of embodied, multi-sensor control loop that shows up again in robot data-collection pipelines and humanoid robot training stacks more broadly.

Distributed RL at insect scale. The Ray + DMPO training path is the same general shape used across modern RL infrastructure — rollout workers generating experience in parallel, a learner updating a policy from batches, weights synced back out — just applied to a fly instead of a humanoid or a chat model. If you've read how open-source RL-as-a-service stacks decompose into rollout engines, trainers, and environment layers for LLM post-training, flybody's Ray script is the same architecture pattern one level down, running against a physics simulator instead of a language model.

What people are asking

Is this a real robot? No — flybody is purely a simulation. Nothing here builds or controls physical hardware; it's a MuJoCo XML model plus Python environments and training code.

Why a fly specifically, and not a more "useful" robot body? Drosophila is one of the most extensively studied model organisms in neuroscience, with decades of connectome, behavior, and muscle-physiology data available to validate a simulated body against. That existing ground truth is what makes a biophysically accurate model tractable and scientifically checkable — you can't easily do the same validation for an arbitrary robot morphology invented for a paper.

How mature is the project? The repo has a single tagged release (v0.1.0, from two years ago) and one primary contributor (Roman Vaxenburg) alongside the collaboration credited in the paper. It's stable enough to have shipped a Nature publication built on it, but it isn't under active feature development at the pace of a general-purpose robotics framework — expect a focused, research-grade codebase rather than a growing product.

What are the honest limitations? The core install deliberately excludes Tensorflow and Acme, so out of the box you get the body and environments but not turnkey policy training — you need the [tf] or [ray] extras, plus MUJOCO_GL/CUDNN_PATH environment configuration the README calls out explicitly, before training or even GPU-accelerated rendering works. It's also scoped tightly to the fly body itself; there's no built-in path to transfer a trained policy to other simulated organisms or to physical insect-scale robots.

Does it compare to standard MuJoCo RL benchmarks? Not directly — Ant, Humanoid, and Walker2d exist to benchmark control algorithms against each other on a fixed body, while flybody exists to test whether a specific real animal's behavior can be reproduced. Comparing sample efficiency across them tells you more about task difficulty than about which RL algorithm is "better."

Citing the work

If you use flybody in research, the maintainers ask for the Nature citation directly, not just a repo link:

bibtex
@article{flybody,
  title = {Whole-body physics simulation of fruit fly locomotion},
  author = {Roman Vaxenburg and Igor Siwanowicz and Josh Merel and Alice A Robie and
            Carmen Morrow and Guido Novati and Zinovia Stefanidi and Gert-Jan Both and
            Gwyneth M Card and Michael B Reiser and Matthew M Botvinick and
            Kristin M Branson and Yuval Tassa and Srinivas C Turaga},
  journal = {Nature},
  volume = {643},
  pages = {1312--1320},
  year = {2025},
  doi = {https://doi.org/10.1038/s41586-025-09029-4},
}

The takeaway

flybody is a narrow but well-built example of a broader trend: physics engines like MuJoCo are becoming the shared substrate for both robotics RL and computational biology, because a policy that has to obey real muscle-actuator constraints is forced to learn something closer to how the real system actually works. Whether you're training a humanoid to walk or testing a hypothesis about how a fly's nervous system flies, the tooling — distributed rollouts, a physics-accurate body, an RL agent updating from batched experience — looks the same underneath.

Related on explainx.ai

  • What are world models? Complete guide
  • Open-source RL-as-a-service: what that phrase actually buys you
  • NVIDIA Cosmos 3: open physical AI world model guide
  • 500 humanoid robots, Unitree, and the BitRobot dataset
  • Figure Helix-02: collaborative humanoid robots
  • Official flybody repository
  • Nature paper: Whole-body physics simulation of fruit fly locomotion

Repository details, star/fork counts, and version specs in this post are accurate as of the publication date above — check the flybody GitHub repo for the latest release.

Spotted something out of date? Let us know.
Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

Related posts

Aug 27, 2026

Microduck: Hugging Face Ships the $399 RL Duck the Open Source Community Prototyped

Microduck is a 25 cm, 800 g bipedal robot with 15 actuators, a camera, LiDAR and two IMUs, priced at $399 with delivery before Christmas 2026. The whole software stack is Apache-2.0, policies train in MuJoCo and export to ONNX, and the control loop runs on-robot at 50 Hz. It is also the commercial descendant of Open Duck Mini — the 3D-printable duck explainx.ai covered running Gemma 4 at Google I/O.

Aug 5, 2026

Microsoft Orchard: Open-Source Agentic Modeling Framework Explained

Microsoft open-sourced Orchard, a Kubernetes-native sandbox and training substrate meant to stop agent researchers from rebuilding datasets and environments for every new paper. Its three recipes hit 73.0% SWE-bench Verified, 68.4% average on GUI navigation, and generalize to unseen harnesses where comparison models collapse to near zero.

Aug 5, 2026

RLSVR/SpyRL: Turning "Who Is the Spy?" Into RL Training Signal

RLSVR's SpyRL instantiation extends reinforcement learning with verifiable rewards (RLVR) into domains that have no ground truth — summarization, creative writing — by embedding reward generation inside a "Who Is the Spy?"-style multi-agent game instead of relying on an external judge model. Accepted to COLM 2026, code and checkpoints are public.