Table of Contents

Class Walker2dInfoV5

Namespace
Gym.Environments.Envs.MuJoCo
Assembly
Gym.Environments.dll

Walker2d-v5's info (Walker2dEnvV5), typed (DR-91): a reset sends the first two keys, a step all six.

public sealed record Walker2dInfoV5 : MujocoInfo, IEquatable<EnvInfo>, IEquatable<MujocoInfo>, IEquatable<Walker2dInfoV5>
Inheritance
Walker2dInfoV5
Implements
Inherited Members
Extension Methods

Constructors

Walker2dInfoV5(double, double, double?, double?, double?, double?)

Walker2d-v5's info (Walker2dEnvV5), typed (DR-91): a reset sends the first two keys, a step all six.

public Walker2dInfoV5(double XPosition, double ZDistanceFromOrigin, double? XVelocity, double? RewardForward, double? RewardCtrl, double? RewardSurvive)

Parameters

XPosition double

The torso's x position (x_position, qpos[0]).

ZDistanceFromOrigin double

The torso's height above its initial height (z_distance_from_origin).

XVelocity double?

The x velocity over the step (x_velocity); null on a reset's info.

RewardForward double?

The forward term of the reward, the weighted x velocity (reward_forward).

RewardCtrl double?

The control term, the negative weighted squared action, sent in the action's dtype (reward_ctrl).

RewardSurvive double?

The healthy term (reward_survive): the healthy reward while healthy, 0 otherwise.

Properties

RewardCtrl

The control term, the negative weighted squared action, sent in the action's dtype (reward_ctrl).

public double? RewardCtrl { get; init; }

Property Value

double?

RewardForward

The forward term of the reward, the weighted x velocity (reward_forward).

public double? RewardForward { get; init; }

Property Value

double?

RewardSurvive

The healthy term (reward_survive): the healthy reward while healthy, 0 otherwise.

public double? RewardSurvive { get; init; }

Property Value

double?

XPosition

The torso's x position (x_position, qpos[0]).

public double XPosition { get; init; }

Property Value

double

XVelocity

The x velocity over the step (x_velocity); null on a reset's info.

public double? XVelocity { get; init; }

Property Value

double?

ZDistanceFromOrigin

The torso's height above its initial height (z_distance_from_origin).

public double ZDistanceFromOrigin { get; init; }

Property Value

double

Methods

Equals(Walker2dInfoV5?)

Record equality (DR-92): the members compare as Python's == compares them (PyEquality), arrays by value; the dict inside takes no part.

public bool Equals(Walker2dInfoV5? other)

Parameters

other Walker2dInfoV5

The other record.

Returns

bool

true when the members are equal.

GetHashCode()

A hash consistent with Equals(object): the member count, as array members have no value hash.

public override int GetHashCode()

Returns

int

The hash.

ToInfoCore()

The members as a new dict by Python name, in declaration order, a null member's key left out.

protected override Info ToInfoCore()

Returns

Info

A new dict.

ToString()

Python's repr of the info dict (ToInfo()): {'x_position': np.float64(0.1), ...}.

public override string ToString()

Returns

string

The text.

Operators

implicit operator Info(Walker2dInfoV5)

The record as an info dict (EnvInfo.ToInfo): the dict it was read from, the env's values kept, else its members by Python name.

public static implicit operator Info(Walker2dInfoV5 value)

Parameters

value Walker2dInfoV5

The record.

Returns

Info

A new dict; array values are shared, not copied.

Exceptions

ArgumentNullException

Thrown when value is null.

implicit operator Walker2dInfoV5(Info)

The typed record of an env's info dict (DR-91): each member read with InfoExtensions.Get<T>'s conversions, a nullable member null when its key is absent; the record keeps the dict, whose values its indexer reads.

public static implicit operator Walker2dInfoV5(Info value)

Parameters

value Info

The info dict, typically step.Info; the record shares it.

Returns

Walker2dInfoV5

The record.

Exceptions

ArgumentNullException

Thrown when value is null.

KeyError

Thrown, with Python's message, when the key of a member that is not nullable is missing.

InvalidCastException

Thrown when a value cannot be read as its member's type.

OverflowException

Thrown when an integer does not fit its member's type.