Table of Contents

Class ReacherInfoV4

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

Reacher-v4's info (ReacherEnvV4), typed (DR-91): a step's two keys; a v4 reset sends {}.

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

Constructors

ReacherInfoV4(double?, double?)

Reacher-v4's info (ReacherEnvV4), typed (DR-91): a step's two keys; a v4 reset sends {}.

public ReacherInfoV4(double? RewardDist, double? RewardCtrl)

Parameters

RewardDist double?

The distance term, the negative distance of the fingertip from the target (reward_dist).

RewardCtrl double?

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

Properties

RewardCtrl

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

public double? RewardCtrl { get; init; }

Property Value

double?

RewardDist

The distance term, the negative distance of the fingertip from the target (reward_dist).

public double? RewardDist { get; init; }

Property Value

double?

Methods

Equals(ReacherInfoV4?)

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

Parameters

other ReacherInfoV4

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

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

Parameters

value ReacherInfoV4

The record.

Returns

Info

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

Exceptions

ArgumentNullException

Thrown when value is null.

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

Parameters

value Info

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

Returns

ReacherInfoV4

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.