Class HumanoidInfoV5
- Namespace
- Gym.Environments.Envs.MuJoCo
- Assembly
- Gym.Environments.dll
Humanoid-v5's info (HumanoidEnvV5), typed (DR-91): a reset sends the first five keys, a step all eleven.
public sealed record HumanoidInfoV5 : MujocoInfo, IEquatable<EnvInfo>, IEquatable<MujocoInfo>, IEquatable<HumanoidInfoV5>
- Inheritance
-
HumanoidInfoV5
- Implements
- Inherited Members
- Extension Methods
Constructors
HumanoidInfoV5(double, double, NDArray, NDArray, double, double?, double?, double?, double?, double?, double?)
Humanoid-v5's info (HumanoidEnvV5), typed (DR-91): a reset sends the first five keys, a step all eleven.
public HumanoidInfoV5(double XPosition, double YPosition, NDArray TendonLength, NDArray TendonVelocity, double DistanceFromOrigin, double? XVelocity, double? YVelocity, double? RewardSurvive, double? RewardForward, double? RewardCtrl, double? RewardContact)
Parameters
XPositiondoubleThe torso's x position (
x_position,qpos[0]).YPositiondoubleThe torso's y position (
y_position,qpos[1]).TendonLengthNDArrayThe lengths of the two tendons from the hips to the knees (
tendon_length), a float64 array the step result owns.TendonVelocityNDArrayThe velocities of the two tendons (
tendon_velocity), a float64 array the step result owns.DistanceFromOrigindoubleThe torso's distance from the origin in the x-y plane (
distance_from_origin).XVelocitydouble?The center of mass's x velocity over the step (
x_velocity); null on a reset's info.YVelocitydouble?The center of mass's y velocity over the step (
y_velocity); null on a reset's info.RewardSurvivedouble?The healthy term (
reward_survive): the healthy reward while healthy, 0 otherwise.RewardForwarddouble?The forward term of the reward, the weighted x velocity (
reward_forward).RewardCtrldouble?The control term, the negative weighted squared action (
reward_ctrl).RewardContactdouble?The contact term, the negative weighted squared clipped external contact forces (
reward_contact).
Properties
DistanceFromOrigin
The torso's distance from the origin in the x-y plane (distance_from_origin).
public double DistanceFromOrigin { get; init; }
Property Value
RewardContact
The contact term, the negative weighted squared clipped external contact forces (reward_contact).
public double? RewardContact { get; init; }
Property Value
RewardCtrl
The control term, the negative weighted squared action (reward_ctrl).
public double? RewardCtrl { get; init; }
Property Value
RewardForward
The forward term of the reward, the weighted x velocity (reward_forward).
public double? RewardForward { get; init; }
Property Value
RewardSurvive
The healthy term (reward_survive): the healthy reward while healthy, 0 otherwise.
public double? RewardSurvive { get; init; }
Property Value
TendonLength
The lengths of the two tendons from the hips to the knees (tendon_length), a float64 array the step result owns.
public NDArray TendonLength { get; init; }
Property Value
TendonVelocity
The velocities of the two tendons (tendon_velocity), a float64 array the step result owns.
public NDArray TendonVelocity { get; init; }
Property Value
XPosition
The torso's x position (x_position, qpos[0]).
public double XPosition { get; init; }
Property Value
XVelocity
The center of mass's x velocity over the step (x_velocity); null on a reset's info.
public double? XVelocity { get; init; }
Property Value
YPosition
The torso's y position (y_position, qpos[1]).
public double YPosition { get; init; }
Property Value
YVelocity
The center of mass's y velocity over the step (y_velocity); null on a reset's info.
public double? YVelocity { get; init; }
Property Value
Methods
Equals(HumanoidInfoV5?)
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(HumanoidInfoV5? other)
Parameters
otherHumanoidInfoV5The 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(HumanoidInfoV5)
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(HumanoidInfoV5 value)
Parameters
valueHumanoidInfoV5The record.
Returns
- Info
A new dict; array values are shared, not copied.
Exceptions
- ArgumentNullException
Thrown when
valueis null.
implicit operator HumanoidInfoV5(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 HumanoidInfoV5(Info value)
Parameters
valueInfoThe info dict, typically
step.Info; the record shares it.
Returns
- HumanoidInfoV5
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.