Whole-body physics simulation of fruit fly locomotion - Roman Vaxenburg; Igor Siwanowicz; Josh Merel; Alice A. Robie; Carmen Morrow; Guido Novati; Zinovia Stefanidi; Gert-Jan Both; Gwyneth M. Card; Michael B. Reiser; Matthew M. Botvinick; Kristin M. Branson; et al. (Nature, 2025)
Abstract The body of an animal influences how its nervous system generates behaviour1. Accurately modelling the neural control of sensorimotor behaviour requires an anatomically detailed biomechanical representation of the body. Here we introduce a whole-body model of the fruit fly Drosophila melanogaster in a physics simulator2. Designed as a general-purpose framework, our model enables the simulation of diverse fly behaviours, including both terrestrial and aerial locomotion. We validate its versatility by replicating realistic walking and flight behaviours. To support these behaviours, we develop phenomenological models for fluid and adhesion forces. Using data-driven, end-to-end reinforcement learning3,4, we train neural network controllers capable of generating naturalistic locomotion5–7 along complex trajectories in response to high-level steering commands. Furthermore, we show the use of visual sensors and hierarchical motor control8, training a high-level controller to reuse a pretrained low-level flight controller to perform visually guided flight tasks. Our model serves as an open-source platform for studying the neural control of sensorimotor behaviour in an embodied context.