Table of Contents

Namespace Gym.Environments.Envs.Classic

Classes

AcrobotEnv

Acrobot-v1: two links joined in a chain, hanging from a fixed joint, with a torque of -1, 0 or +1 (actions 0, 1, 2) on the joint between them; the goal is to swing the free end above a line one link-length over the base. -1 per step until then, 0 on the terminating step. Byte for byte what Gymnasium's Acrobot computes, errors included.

AcrobotEnvOptions

The keyword arguments of AcrobotEnv's constructor as a typed record (DR-34), generated from the constructor so it cannot drift from it. A property that is set becomes a keyword argument by its Python name; one left unset is not passed, so make keeps the registered spec's value and the constructor its default.

CartPoleEnv

CartPole-v1: a pole hinged on a cart that is pushed left (action 0) or right (action 1) with a fixed force, until the pole leans more than 12° or the cart leaves ±2.4. Byte for byte what Gymnasium's CartPole computes: the same float64 dynamics in the same operation order, float32 observations, rewards, termination, warnings, errors, reset options, rgb_array pixels and human-mode pacing.

CartPoleEnvOptions

The keyword arguments of CartPoleEnv's constructor as a typed record (DR-34), generated from the constructor so it cannot drift from it. A property that is set becomes a keyword argument by its Python name; one left unset is not passed, so make keeps the registered spec's value and the constructor its default.

CartPoleVectorEnv

CartPole vectorized natively: NumEnvs carts stepped together as arrays, with their own time limit and autoreset (NEXT_STEP), which MakeVec("CartPole-v1", numEnvs: n) builds through the spec's vector entry point. Byte for byte what Gymnasium's CartPoleVectorEnv computes: the dynamics of every cart, the generator draws (one (4, num_envs) draw at reset, one (4, k) draw per step for the k carts that ended at the previous one), the observations and flags, and the frames.

CartPoleVectorEnvOptions

The keyword arguments of CartPoleVectorEnv's constructor as a typed record (DR-34), generated from the constructor so it cannot drift from it. A property that is set becomes a keyword argument by its Python name; one left unset is not passed, so make keeps the registered spec's value and the constructor its default.

ClassicControlUtils

The reset-option parsing every classic-control env shares, so Reset(seed, options) accepts and rejects exactly what Gymnasium's reset does, with the same messages.

MountainCarEnv

MountainCar-v0 and MountainCarContinuous-v0 in one class (DR-32): a car in a valley that must build momentum to reach the flag on the right hill. Discrete mode pushes left, not at all or right (actions 0, 1, 2) and pays -1 per step; continuous mode applies a force in [-1, 1] and pays 100 at the flag minus 0.1 times the squared force. Byte for byte what Gymnasium's two classes compute, errors included.

MountainCarEnvOptions

The keyword arguments of MountainCarEnv's constructor as a typed record (DR-34), generated from the constructor so it cannot drift from it. A property that is set becomes a keyword argument by its Python name; one left unset is not passed, so make keeps the registered spec's value and the constructor its default.

PendulumEnv

Pendulum-v1: a pendulum hanging from a pivot, swung up and balanced by a torque in [-2, 2]. The reward is the negative cost θ² + 0.1·θ̇² + 0.001·u² (θ normalized to [-π, π)), so it is at most 0, reached upright and at rest; the env never terminates. Byte for byte what Gymnasium's Pendulum computes, errors included.

PendulumEnvOptions

The keyword arguments of PendulumEnv's constructor as a typed record (DR-34), generated from the constructor so it cannot drift from it. A property that is set becomes a keyword argument by its Python name; one left unset is not passed, so make keeps the registered spec's value and the constructor its default.