Table of Contents

Namespace Gym.Envs.Registration

Classes

EnvRegistry

Gymnasium's gymnasium.envs.registration module: the id grammar, the process-wide Registry, Register(string, object?, double?, bool, long?, bool, bool, IEnumerable<WrapperSpec>?, object?, object?), Spec(string), Make(string, object?, long?, bool?) and PprintRegistry(IReadOnlyDictionary<string, EnvSpec>?, int, IEnumerable<string?>?, bool). The top-level Gymnasium class re-exports them, as gymnasium.make re-exports gymnasium.envs.registration.make.

EnvSpec

Everything make needs to build an env and the wrappers it adds (time limit, order enforcing, env checker), plus the wrappers applied since. An env built by make carries it as Spec; a wrapper's Spec is a copy extended with the wrapper, so editing one never changes another.

EnvSpecRegistry

The registry's dict, env id to EnvSpec (Python's gymnasium.registry, a plain dict): iteration follows registration order, which pprint_registry and the "Did you mean" suggestions read, and re-registering an id replaces its spec in place. Tests and plugins edit it directly (del registry[id] is Remove(string)).

VectorizeModes

Python's view of VectorizeMode's members (DR-84): their .name, .value, str and repr, and Gymnasium's VectorizeMode(value) call. A C# enum cannot carry members of its own, so they live here, beside it.

WrapperSpec

The record of one wrapper applied on top of an env, which AdditionalWrappers accumulates as Spec walks up a stack. make (P3) re-creates the wrapper from it.

Enums

VectorizeMode

How MakeVec vectorizes an env: Sync steps copies made with Make one after another (SyncVectorEnv), Async runs them in parallel on worker threads (AsyncVectorEnv, DR-22), and VectorEntryPoint builds the env's own vectorized class from its spec's vector_entry_point (CartPoleVectorEnv), which is also the default whenever a spec has one.

Delegates

EnvCreator

A function that builds an env from keyword arguments, one of the two forms of EntryPoint (the other is a "Namespace:Class" string).