Train and evaluate a Unitree H1 humanoid in MuJoCo using Gymnasium and Stable-Baselines3 SAC, with a custom environment that adds phase-based gait rewards and curriculum learning.
conda create -n mujoco-sim python=3.11 -y
conda activate mujoco-sim
pip install -r requirements.txt
# or
python -m pip install -r requirements.txt# test
python main.py
# train (logs to stdout + TensorBoard)
python train.py --mode train
# view curves
tensorboard --logdir logs/tb
# evaluate (optionally render a window)
python train.py --mode eval --render
# view a previously trained model
python train.py --mode eval --episodes 20 --render --model models/sac_LocalH1.zip --stochastic