Class SyncVectorEnv
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
Reference: gymnasium/vector/sync_vector_env.py.
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
envFnsIEnumerable<Func<IEnv>>One function per sub-env, called once each, in order.
copyboolWhether every returned observation batch is a deep copy.
observationModeobject"same"(null),"different", or the pair of batched and single spaces.autoresetModeobjectAn AutoresetMode or its value; null is
NEXT_STEP.
Exceptions
- ArgumentNullException
Thrown when
envFnsis 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.