How fruitflydev/therealfly works
therealfly maps measured connectome annotations to motor-neuron pools, tests cord dynamics, and then translates neural activity into MuJoCo body motion; its closed-loop stage maps body state back to proprioceptor drive. The main user workflow is staged scientific evaluation: map, simulate and assess the cord, run open-loop body trials, then close the sensory loop. The graph includes the documented v2 cord protocol, reflex analysis, and body rendering. Several implementations were not sampled, so their documented capabilities are shown without speculative internal wiring.
Main entry points: mujoco_body.py MuJoCo body · rhythm.py Rhythm protocol · openloop.py Open-loop trials · rhythm_v2.py Protocol v2
Components 18
Connectome mapping
- Connectome data
therealfly/data.py - Motor map
therealfly/motor_map.py
Cord simulation
- LIF simulator
- Rhythm protocol
cord/rhythm.py - Brain properties
cord/brain_props.py - Protocol v2
cord/rhythm_v2.py
Body and feedback
- MuJoCo fly
- Body model
body/model.py - MuJoCo body
body/mujoco_body.py - Actuator inventory
body/actuators.json - Actuator signs
body/signs.py - Motor coupling
body/coupling.py - Open-loop trials
body/openloop.py - Proprioceptor drive
body/proprioception.py - Body rendering
body/render.py
Evaluation
- Reflex analysis
body/reflex.py - Stage results
build
Other components
- Researcher
Connections 25
- Researcher → Motor map: builds map
- Connectome data → Motor map: reads annotations
- Connectome data → Rhythm protocol: provides graph data
- Researcher → Rhythm protocol: runs protocol
- Rhythm protocol → LIF simulator: simulates cord
- Protocol v2 → Rhythm protocol: reuses simulation
- Protocol v2 → Brain properties: tests properties
- Brain properties → LIF simulator: extends model
- Researcher → Protocol v2: runs protocol
- Motor map → Motor coupling: supplies pools
- Actuator inventory → Motor coupling: defines actuators
- Actuator signs → Motor coupling: supplies signs
- Body model → MuJoCo body: configures body
- MuJoCo body → MuJoCo fly: steps simulation
- Researcher → Open-loop trials: runs trials
- Open-loop trials → Motor coupling: converts rates
- Open-loop trials → MuJoCo body: steps body
- Open-loop trials → Stage results: records metrics
- MuJoCo body → Proprioceptor drive: provides state
- Proprioceptor drive → LIF simulator: drives sensory neurons
- Researcher → Reflex analysis: evaluates reflex
- Reflex analysis → LIF simulator: analyzes wiring
- MuJoCo body → Body rendering: provides body state
- Rhythm protocol → Stage results: writes metrics
- Protocol v2 → Stage results: writes metrics