Skip to main content

HalfCheetah

superdex_gym/HalfCheetah-v0 · superdex.lab.gym.envs.benchmarks.halfcheetah_env.HalfCheetahEnv

HalfCheetah

Description​

HalfCheetah provides planar (2-D) running. The reward favors forward velocity and penalizes control effort.

Action Space​

The action is a (6,) Box. The element control is bounded [-1.0, 1.0] and applied as external forces on DOFs 3-8 with per-joint force scales [120, 90, 60, 120, 60, 30].

Observation Space​

The observation is a (17,) Box with the default configuration, flattened in alphabetical key order:

KeyShapeMeaning
pose8num_dofs (9) - 1 for the excluded x-coordinate
vel9One per DOF

There is no contact observation. Turning off exclude_current_position_from_observation adds 1.

Rewards​

The scalar reward is the sum of two terms:

TermValue
forwardx_velocity * forward_reward_weight
ctrl-control_cost_weight * dot(control, control)

Starting State​

The scene is restored to its captured initial state, then uniform reset noise scaled by reset_noise_scale (default 0.1) is added to the pose and velocity.

Episode End​

HalfCheetah never terminates; it does not override the stop criteria, so terminated is never True. It only truncates at steps_per_episode.

Arguments​

In addition to the shared MochiEnvCfg fields (see the Authoring guide's base configuration section), HalfCheetahEnvCfg accepts:

FieldDefaultMeaning
control_frequency20Control frequency [Hz]
simulation_frequency100Simulation frequency [Hz]; 5 substeps per control step
steps_per_episode1000Truncation limit
reset_noise_scale0.1Scale of the uniform reset noise
forward_reward_weight1Weight of the forward-progress term
control_cost_weight0.1Weight of the control-cost penalty
exclude_current_position_from_observationTrueOmit the x-coordinate
use_gravityTrueApply gravity
use_rest_springsTrueApply rest springs to the joints

Scene identity​

uid_fields = (use_gravity, use_rest_springs).

Variants​

HalfCheetahFullObservation​

superdex_gym/HalfCheetahFullObservation-v0

FieldValue
exclude_current_position_from_observationFalse