Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MuJoCo environments

MuJoCo environments require the mujoco feature and MuJoCo 3.10.0. Construct them with new(None) for defaults or new(Some(config)). Actions and observations are DVector<f64>; control length is the loaded model’s nu, and controls use its actuator ranges.

EnvironmentDefault observationDefault action and rangeHorizon
Ant1058 × \([-1,1]\)1000
HalfCheetah176 × \([-1,1]\)1000
Hopper113 × \([-1,1]\)1000
Humanoid34817 × \([-0.4,0.4]\)1000
HumanoidStandup34817 × \([-0.4,0.4]\)1000
InvertedDoublePendulum91 × \([-1,1]\)1000
InvertedPendulum41 × \([-3,3]\)1000
Pusher237 × \([-2,2]\)100
Reacher102 × \([-1,1]\)50
Swimmer82 × \([-1,1]\)1000
Walker2d176 × \([-1,1]\)1000

Each action is held for frame_skip MuJoCo steps. Thus \(\Delta t=\text{frame_skip}\times\text{model timestep}\), and velocity rewards use displacement divided by this agent timestep. See backend dynamics.

Custom XML may change nq, nv, nu, body count, ranges, timestep, and therefore observation/action dimensions. It must preserve body and site names used by task-specific lookups.