Table of Contents

Class SyncVectorEnv

Namespace
Gym.Vector
Assembly
Gym.dll

SyncVectorEnv<TObs, TAct> untyped: observations and actions are objects, whatever the spaces, as Gymnasium's own. The untyped MakeVec builds this one.

public class SyncVectorEnv : SyncVectorEnv<object?, object?>, IVectorEnv, IDisposable
Inheritance
SyncVectorEnv
Implements
Inherited Members
Extension Methods

Remarks

Constructors

SyncVectorEnv(IEnumerable<Func<IEnv>>, bool, object?, object?)

Builds the sub-envs and the batched spaces; see SyncVectorEnv<TObs, TAct>'s constructor.

public SyncVectorEnv(IEnumerable<Func<IEnv>> envFns, bool copy = true, object? observationMode = null, object? autoresetMode = null)

Parameters

envFns IEnumerable<Func<IEnv>>

One function per sub-env, called once each, in order.

copy bool

Whether every returned observation batch is a deep copy.

observationMode object

"same" (null), "different", or the pair of batched and single spaces.

autoresetMode object

An AutoresetMode or its value; null is NEXT_STEP.

Exceptions

ArgumentNullException

Thrown when envFns is null.

ValueError

Thrown for an unknown autoreset or observation mode.

IndexError

Thrown when there are no sub-envs.

TypeError

Thrown when a pair observation mode holds something else than spaces.

RuntimeError

Thrown when a sub-env's spaces do not fit.