Table of Contents

Class CartPoleEnvOptions

Namespace
Gym.Environments.Envs.Classic
Assembly
Gym.Environments.dll

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.

public sealed record CartPoleEnvOptions : IGymOptions, IEquatable<CartPoleEnvOptions>
Inheritance
CartPoleEnvOptions
Implements
Inherited Members
Extension Methods

Properties

RenderMode

Gymnasium's render_mode: null (no rendering), "human" or "rgb_array". Not validated, as in Gymnasium (make checks it against metadata["render_modes"]): another mode draws each frame off-screen and Render() returns nothing, as Python's does. The render_mode keyword argument, passed on only once set.

public string? RenderMode { get; init; }

Property Value

string

SuttonBartoReward

Gymnasium's sutton_barto_reward: true rewards 0 per surviving step and -1 on and after termination (Sutton and Barto's original), instead of 1 per step including the terminating one. The sutton_barto_reward keyword argument, passed on only once set.

public bool SuttonBartoReward { get; init; }

Property Value

bool

ViewerFactory

Gym.NET's viewer_factory (DR-20): creates the human-mode window on the first human render; null uses Gymnasium.HumanViewerFactory, read at that render. The viewer_factory keyword argument, passed on only once set.

public EnvViewerFactory? ViewerFactory { get; init; }

Property Value

EnvViewerFactory

Methods

ToKwargs()

The set properties as keyword arguments by Python name, in constructor order.

public Info ToKwargs()

Returns

Info

A new dict the caller owns.