Struct VectorResetResult<TObs>
The first observations of every reset sub-env and their merged infos, (observations, infos). Deconstructs
like a tuple: var (obs, infos) = envs.Reset(seed: 42);.
public readonly record struct VectorResetResult<TObs> : INDArrayCarrier, IDisposable, IEquatable<VectorResetResult<TObs>>
Type Parameters
TObsThe batched observation type.
- Implements
-
IEquatable<VectorResetResult<TObs>>
- Inherited Members
- Extension Methods
Remarks
Equality is exact, as VectorStepResult<TObs>'s. Reference: gymnasium/vector/vector_env.py (VectorEnv.reset).
Constructors
VectorResetResult(TObs, Info)
The first observations of every reset sub-env and their merged infos, (observations, infos). Deconstructs
like a tuple: var (obs, infos) = envs.Reset(seed: 42);.
public VectorResetResult(TObs Observations, Info Infos)
Parameters
ObservationsTObsThe sub-envs' observations batched along the first axis; owned by the caller.
InfosInfoThe sub-envs' reset infos merged by key, each with its
_keymask, as a step's.
Remarks
Equality is exact, as VectorStepResult<TObs>'s. Reference: gymnasium/vector/vector_env.py (VectorEnv.reset).
Properties
Infos
The sub-envs' reset infos merged by key, each with its _key mask, as a step's.
public Info Infos { get; init; }
Property Value
Observations
The sub-envs' observations batched along the first axis; owned by the caller.
public TObs Observations { get; init; }
Property Value
- TObs
Methods
Dispose()
Releases the observations' and the infos' arrays, as Dispose() does.
public void Dispose()
Remarks
Footgun: copies share the arrays; dispose once, after their last use.
Equals(VectorResetResult<TObs>)
Exact equality of the observations and Python equality of the infos.
public bool Equals(VectorResetResult<TObs> other)
Parameters
otherVectorResetResult<TObs>The other result.
Returns
GetHashCode()
A hash consistent with Equals(VectorResetResult<TObs>).
public override int GetHashCode()
Returns
- int
The hash.