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

Walker2d

State and action spaces

The default 17-value observation is qpos[1..] followed by all velocities clipped to \([-10,10]\); retaining root x produces 18 values. The default action is six controls in \([-1,1]\).

Dynamics and reward

\[ r=w_fv_x+r_{healthy}-w_u\lVert u\rVert_2^2. \]

Health requires root height strictly inside healthy_z_range and torso angle strictly inside healthy_angle_range. Info contains x position/velocity, z displacement from reset, and forward/control/survival components.

Episode end

Unhealthy state terminates when configured; the horizon truncates.

Configuration

FieldDefaultMeaning
xml_file, frame_skipembedded, 4Model and action duration
forward/control weights1, 0.001Reward coefficients
healthy reward1Survival reward
terminate unhealthytrueEnable health termination
healthy z/angle ranges(0.8,2), (-1,1)Strict health tests
reset noise0.005Uniform qpos/qvel noise
exclude root xtrueObservation switch
horizon1000Truncation limit

Reference: Gymnasium Walker2d.