Requirements
- Python 3.11+
- MuJoCo (via
pip install mujoco) - PyTorch
- NumPy, msgpack
Installation
git clone https://github.com/MarcHesse/mhflocke.git
cd mhflocke
pip install -r requirements.txt
First Training Run
Go2 (Unitree, simulation only)
python scripts/train_v032.py \
--creature-name go2 \
--scene "walk on flat meadow" \
--steps 50000 \
--skip-morph-check \
--no-terrain \
--auto-reset 500 \
--seed 42
Expected: Go2 walks ~25m in 50k steps, 0 falls. Takes ~20 min on CPU.
Freenove (simulation with hardware drift)
python scripts/train_baby.py \
--creature-name freenove \
--phototaxis \
--steps 50000 \
--no-llm \
--hardware-sensors \
--no-vision \
--auto-reset 500 \
--fresh \
--drift-profile creatures/freenove/drift_profiles/measured_marc_01.json
Expected: Freenove walks ~6.5m, finds 3 light targets, 0 falls. Takes ~18 min on CPU.
Analyzing Results
# FLOG dashboard (web-based)
python flog_server.py
# Open http://localhost:5050
# Render training video
python scripts/render_freenove.py creatures/freenove/v043_.../training_log.bin
# Add data-driven audio (sonification)
python scripts/sonify_flog.py --flog creatures/.../training_log.bin --speed 2 --mux output.mp4
Running on Real Hardware
See Hardware for Freenove Robot Dog deployment on Raspberry Pi 4.
Key CLI Parameters
| Parameter | Script | Description |
|---|---|---|
--creature-name |
Both | Robot: freenove or go2 |
--steps |
Both | Training steps (50k typical) |
--fresh |
Both | Ignore saved brain, start from scratch |
--phototaxis |
train_baby.py | Enable light-tracking navigation |
--drift-profile |
train_baby.py | Inject hardware drift into simulation |
--hardware-sensors |
train_baby.py | Use Bridge v2.5 sensor layout (48ch) |
--auto-reset |
Both | Reset after N stuck steps |
--seed |
train_v032.py | Random seed for reproducibility |