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
RewardLinveldouble?The forward term of the reward (
reward_linvel, v5'sreward_forward).RewardQuadctrldouble?The control term, the negative weighted squared action (
reward_quadctrl, v5'sreward_ctrl).RewardAlivedouble?The healthy term (
reward_alive, v5'sreward_survive), given every step in v4.XPositiondouble?The center of mass's x position after the step (
x_position).YPositiondouble?The center of mass's y position after the step (
y_position).DistanceFromOrigindouble?The center of mass'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).YVelocitydouble?The center of mass's y velocity over the step (
y_velocity).ForwardRewarddouble?The forward term again (
forward_reward), the value ofRewardLinvel; 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
ForwardReward
The forward term again (forward_reward), the value of RewardLinvel; v5 drops it.
public double? ForwardReward { get; init; }
Property Value
RewardAlive
The healthy term (reward_alive, v5's reward_survive), given every step in v4.
public double? RewardAlive { get; init; }
Property Value
RewardLinvel
The forward term of the reward (reward_linvel, v5's reward_forward).
public double? RewardLinvel { get; init; }
Property Value
RewardQuadctrl
The control term, the negative weighted squared action (reward_quadctrl, v5's reward_ctrl).
public double? RewardQuadctrl { get; init; }
Property Value
XPosition
The center of mass's x position after the step (x_position).
public double? XPosition { get; init; }
Property Value
XVelocity
The center of mass's x velocity over the step (x_velocity).
public double? XVelocity { get; init; }
Property Value
YPosition
The center of mass's y position after the step (y_position).
public double? YPosition { get; init; }
Property Value
YVelocity
The center of mass's y velocity over the step (y_velocity).
public double? YVelocity { get; init; }
Property Value
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
otherHumanoidInfoV4The 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(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
valueHumanoidInfoV4The record.
Returns
- Info
A new dict; array values are shared, not copied.
Exceptions
- ArgumentNullException
Thrown when
valueis 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
valueInfoThe info dict, typically
step.Info; the record shares it.
Returns
- HumanoidInfoV4
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.