Table of Contents

Struct VectorResetResult<TObs>

Namespace
Gym.Vector
Assembly
Gym.dll

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

TObs

The batched observation type.

Implements
Inherited Members
Extension Methods

Remarks

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

Observations TObs

The sub-envs' observations batched along the first axis; owned by the caller.

Infos Info

The sub-envs' reset infos merged by key, each with its _key mask, as a step's.

Remarks

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

Info

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

other VectorResetResult<TObs>

The other result.

Returns

bool

true when both are equal.

GetHashCode()

A hash consistent with Equals(VectorResetResult<TObs>).

public override int GetHashCode()

Returns

int

The hash.