Class InvertedDoublePendulumInfoV5
- Namespace
- Gym.Environments.Envs.MuJoCo
- Assembly
- Gym.Environments.dll
InvertedDoublePendulum-v5's info (InvertedDoublePendulumEnvV5), typed (DR-91): a step's three keys; a reset sends {}.
public sealed record InvertedDoublePendulumInfoV5 : MujocoInfo, IEquatable<EnvInfo>, IEquatable<MujocoInfo>, IEquatable<InvertedDoublePendulumInfoV5>
- Inheritance
-
InvertedDoublePendulumInfoV5
- Implements
- Inherited Members
- Extension Methods
Constructors
InvertedDoublePendulumInfoV5(double?, double?, double?)
InvertedDoublePendulum-v5's info (InvertedDoublePendulumEnvV5), typed (DR-91): a step's three keys; a reset sends {}.
public InvertedDoublePendulumInfoV5(double? RewardSurvive, double? DistancePenalty, double? VelocityPenalty)
Parameters
RewardSurvivedouble?The healthy term (
reward_survive), a Python float.DistancePenaltydouble?The negative penalty for the pole tip's distance from upright (
distance_penalty).VelocityPenaltydouble?The negative penalty for the joints' velocities (
velocity_penalty).
Properties
DistancePenalty
The negative penalty for the pole tip's distance from upright (distance_penalty).
public double? DistancePenalty { get; init; }
Property Value
RewardSurvive
The healthy term (reward_survive), a Python float.
public double? RewardSurvive { get; init; }
Property Value
VelocityPenalty
The negative penalty for the joints' velocities (velocity_penalty).
public double? VelocityPenalty { get; init; }
Property Value
Methods
Equals(InvertedDoublePendulumInfoV5?)
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(InvertedDoublePendulumInfoV5? other)
Parameters
otherInvertedDoublePendulumInfoV5The other record.
Returns
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(InvertedDoublePendulumInfoV5)
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(InvertedDoublePendulumInfoV5 value)
Parameters
valueInvertedDoublePendulumInfoV5The record.
Returns
- Info
A new dict; array values are shared, not copied.
Exceptions
- ArgumentNullException
Thrown when
valueis null.
implicit operator InvertedDoublePendulumInfoV5(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 InvertedDoublePendulumInfoV5(Info value)
Parameters
valueInfoThe info dict, typically
step.Info; the record shares it.
Returns
- InvertedDoublePendulumInfoV5
The record.
Exceptions
- ArgumentNullException
Thrown when
valueis 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.