Table of Contents

Class HumanoidInfoV4

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

Humanoid-v4's info (HumanoidEnvV4), typed (DR-91): a step's nine keys; a v4 reset sends {}.

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

Constructors

HumanoidInfoV4(double?, double?, double?, double?, double?, double?, double?, double?, double?)

Humanoid-v4's info (HumanoidEnvV4), typed (DR-91): a step's nine keys; a v4 reset sends {}.

public HumanoidInfoV4(double? RewardLinvel, double? RewardQuadctrl, double? RewardAlive, double? XPosition, double? YPosition, double? DistanceFromOrigin, double? XVelocity, double? YVelocity, double? ForwardReward)

Parameters

RewardLinvel double?

The forward term of the reward (reward_linvel, v5's reward_forward).

RewardQuadctrl double?

The control term, the negative weighted squared action (reward_quadctrl, v5's reward_ctrl).

RewardAlive double?

The healthy term (reward_alive, v5's reward_survive), given every step in v4.

XPosition double?

The center of mass's x position after the step (x_position).

YPosition double?

The center of mass's y position after the step (y_position).

DistanceFromOrigin double?

The center of mass's distance from the origin in the x-y plane (distance_from_origin).

XVelocity double?

The center of mass's x velocity over the step (x_velocity).

YVelocity double?

The center of mass's y velocity over the step (y_velocity).

ForwardReward double?

The forward term again (forward_reward), the value of RewardLinvel; v5 drops it.

Properties

DistanceFromOrigin

The center of mass's distance from the origin in the x-y plane (distance_from_origin).

public double? DistanceFromOrigin { get; init; }

Property Value

double?

ForwardReward

The forward term again (forward_reward), the value of RewardLinvel; v5 drops it.

public double? ForwardReward { get; init; }

Property Value

double?

RewardAlive

The healthy term (reward_alive, v5's reward_survive), given every step in v4.

public double? RewardAlive { get; init; }

Property Value

double?

RewardLinvel

The forward term of the reward (reward_linvel, v5's reward_forward).

public double? RewardLinvel { get; init; }

Property Value

double?

RewardQuadctrl

The control term, the negative weighted squared action (reward_quadctrl, v5's reward_ctrl).

public double? RewardQuadctrl { get; init; }

Property Value

double?

XPosition

The center of mass's x position after the step (x_position).

public double? XPosition { get; init; }

Property Value

double?

XVelocity

The center of mass's x velocity over the step (x_velocity).

public double? XVelocity { get; init; }

Property Value

double?

YPosition

The center of mass's y position after the step (y_position).

public double? YPosition { get; init; }

Property Value

double?

YVelocity

The center of mass's y velocity over the step (y_velocity).

public double? YVelocity { get; init; }

Property Value

double?

Methods

Equals(HumanoidInfoV4?)

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(HumanoidInfoV4? other)

Parameters

other HumanoidInfoV4

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(HumanoidInfoV4)

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(HumanoidInfoV4 value)

Parameters

value HumanoidInfoV4

The record.

Returns

Info

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

Exceptions

ArgumentNullException

Thrown when value is null.

implicit operator HumanoidInfoV4(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 HumanoidInfoV4(Info value)

Parameters

value Info

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

Returns

HumanoidInfoV4

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.