Namespace Gym.Envs.Registration
Classes
- EnvRegistry
Gymnasium's
gymnasium.envs.registrationmodule: 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, asgymnasium.makere-exportsgymnasium.envs.registration.make.
- EnvSpec
Everything
makeneeds to build an env and the wrappers it adds (time limit, order enforcing, env checker), plus the wrappers applied since. An env built bymakecarries it as Spec; a wrapper'sSpecis 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 plaindict): iteration follows registration order, whichpprint_registryand 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,strandrepr, and Gymnasium'sVectorizeMode(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
MakeVecvectorizes an env: Sync steps copies made withMakeone 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'svector_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).