<liclass="toctree-l1"><aclass="reference internal"href="../../environments/third_party_environments/#third-party-environments-using-gym">Third-Party Environments using Gym</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="../../tutorials/gymnasium_basics/environment_creation/">Make your own custom environment</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="../../tutorials/gymnasium_basics/vector_envs_tutorial/">Training A2C with Vector Envs and Domain Randomization</a></li>
</ul>
</li>
<liclass="toctree-l1 has-children"><aclass="reference internal"href="../../tutorials/training_agents/">Training Agents</a><inputclass="toctree-checkbox"id="toctree-checkbox-10"name="toctree-checkbox-10"role="switch"type="checkbox"/><labelfor="toctree-checkbox-10"><divclass="visually-hidden">Toggle child pages in navigation</div><iclass="icon"><svg><usehref="#svg-arrow-right"></use></svg></i></label><ul>
<liclass="toctree-l2"><aclass="reference internal"href="../../tutorials/training_agents/reinforce_invpend_gym_v26/">Training using REINFORCE for Mujoco</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="../../tutorials/training_agents/blackjack_tutorial/">Solving Blackjack with Q-Learning</a></li>
<liclass="toctree-l1"><aclass="reference external"href="https://github.com/Farama-Foundation/Gymnasium/blob/main/docs/README.md">Contribute to the Docs</a></li>
<h1>Register and Make<aclass="headerlink"href="#register-and-make"title="Permalink to this heading">#</a></h1>
<p>Gymnasium allows users to automatically load environments, pre-wrapped with several important wrappers through the <aclass="reference internal"href="#gymnasium.make"title="gymnasium.make"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.make()</span></code></a> function. To do this, the environment must be registered prior with <aclass="reference internal"href="#gymnasium.register"title="gymnasium.register"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.register()</span></code></a>. To get the environment specifications for a registered environment, use <aclass="reference internal"href="#gymnasium.spec"title="gymnasium.spec"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.spec()</span></code></a> and to print the whole registry, use <aclass="reference internal"href="#gymnasium.pprint_registry"title="gymnasium.pprint_registry"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.pprint_registry()</span></code></a>.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">gymnasium.</span></span><spanclass="sig-name descname"><spanclass="pre">make</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">id</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><aclass="reference internal"href="#gymnasium.envs.registration.EnvSpec"title="gymnasium.envs.registration.EnvSpec"><spanclass="pre">EnvSpec</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">max_episode_steps</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">int</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">autoreset</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">bool</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">apply_api_compatibility</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">bool</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">disable_env_checker</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">bool</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">Any</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><aclass="reference internal"href="../env/#gymnasium.Env"title="gymnasium.Env"><spanclass="pre">Env</span></a></span></span><aclass="headerlink"href="#gymnasium.make"title="Permalink to this definition">#</a></dt>
<dd><p>Creates an environment previously registered with <aclass="reference internal"href="#gymnasium.register"title="gymnasium.register"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.register()</span></code></a> or a <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">EnvSpec</span></code>.</p>
<p>To find all available environments use <codeclass="docutils literal notranslate"><spanclass="pre">gymnasium.envs.registry.keys()</span></code> for all valid ids.</p>
<li><p><strong>id</strong>– A string for the environment id or a <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">EnvSpec</span></code>. Optionally if using a string, a module to import can be included, e.g. <codeclass="docutils literal notranslate"><spanclass="pre">'module:Env-v0'</span></code>.
This is equivalent to importing the module first to register the environment followed by making the environment.</p></li>
<li><p><strong>max_episode_steps</strong>– Maximum length of an episode, can override the registered <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">EnvSpec</span></code><codeclass="docutils literal notranslate"><spanclass="pre">max_episode_steps</span></code>.
The value is used by <aclass="reference internal"href="../wrappers/misc_wrappers/#gymnasium.wrappers.TimeLimit"title="gymnasium.wrappers.TimeLimit"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">gymnasium.wrappers.TimeLimit</span></code></a>.</p></li>
<li><p><strong>autoreset</strong>– Whether to automatically reset the environment after each episode (<aclass="reference internal"href="../wrappers/misc_wrappers/#gymnasium.wrappers.AutoResetWrapper"title="gymnasium.wrappers.AutoResetWrapper"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">gymnasium.wrappers.AutoResetWrapper</span></code></a>).</p></li>
<li><p><strong>apply_api_compatibility</strong>– Whether to wrap the environment with the <aclass="reference internal"href="../wrappers/misc_wrappers/#gymnasium.wrappers.StepAPICompatibility"title="gymnasium.wrappers.StepAPICompatibility"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">gymnasium.wrappers.StepAPICompatibility</span></code></a> wrapper that
By default, the argument is None in which the <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">EnvSpec</span></code><codeclass="docutils literal notranslate"><spanclass="pre">apply_api_compatibility</span></code> is used, otherwise this variable is used in favor.</p></li>
<li><p><strong>disable_env_checker</strong>– If to add <aclass="reference internal"href="../wrappers/misc_wrappers/#gymnasium.wrappers.PassiveEnvChecker"title="gymnasium.wrappers.PassiveEnvChecker"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">gymnasium.wrappers.PassiveEnvChecker</span></code></a>, <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code> will default to the
<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">EnvSpec</span></code><codeclass="docutils literal notranslate"><spanclass="pre">disable_env_checker</span></code> value otherwise use this value will be used.</p></li>
<ddclass="field-odd"><p><strong>Error</strong>– If the <codeclass="docutils literal notranslate"><spanclass="pre">id</span></code> doesn’t exist in the <codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">registry</span></code></p>
<dd><p>Registers an environment in gymnasium with an <codeclass="docutils literal notranslate"><spanclass="pre">id</span></code> to use with <aclass="reference internal"href="#gymnasium.make"title="gymnasium.make"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.make()</span></code></a> with the <codeclass="docutils literal notranslate"><spanclass="pre">entry_point</span></code> being a string or callable for creating the environment.</p>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">id</span></code> parameter corresponds to the name of the environment, with the syntax as follows:
<codeclass="docutils literal notranslate"><spanclass="pre">[namespace/](env_name)[-v(version)]</span></code> where <codeclass="docutils literal notranslate"><spanclass="pre">namespace</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">-v(version)</span></code> is optional.</p>
<p>It takes arbitrary keyword arguments, which are passed to the <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">EnvSpec</span></code><codeclass="docutils literal notranslate"><spanclass="pre">kwargs</span></code> parameter.</p>
<li><p><strong>reward_threshold</strong>– The reward threshold considered for an agent to have learnt the environment</p></li>
<li><p><strong>nondeterministic</strong>– If the environment is nondeterministic (even with knowledge of the initial seed and all actions, the same state cannot be reached)</p></li>
<li><p><strong>max_episode_steps</strong>– The maximum number of episodes steps before truncation. Used by the <aclass="reference internal"href="../wrappers/misc_wrappers/#gymnasium.wrappers.TimeLimit"title="gymnasium.wrappers.TimeLimit"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">gymnasium.wrappers.TimeLimit</span></code></a> wrapper if not <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>.</p></li>
<li><p><strong>order_enforce</strong>– If to enable the order enforcer wrapper to ensure users run functions in the correct order.
If <codeclass="docutils literal notranslate"><spanclass="pre">True</span></code>, then the <aclass="reference internal"href="../wrappers/misc_wrappers/#gymnasium.wrappers.OrderEnforcing"title="gymnasium.wrappers.OrderEnforcing"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">gymnasium.wrappers.OrderEnforcing</span></code></a> is applied to the environment.</p></li>
<li><p><strong>autoreset</strong>– If to add the <aclass="reference internal"href="../wrappers/misc_wrappers/#gymnasium.wrappers.AutoResetWrapper"title="gymnasium.wrappers.AutoResetWrapper"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">gymnasium.wrappers.AutoResetWrapper</span></code></a> such that on <codeclass="docutils literal notranslate"><spanclass="pre">(terminated</span><spanclass="pre">or</span><spanclass="pre">truncated)</span><spanclass="pre">is</span><spanclass="pre">True</span></code>, <aclass="reference internal"href="../env/#gymnasium.Env.reset"title="gymnasium.Env.reset"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.Env.reset()</span></code></a> is called.</p></li>
<li><p><strong>disable_env_checker</strong>– If to disable the <aclass="reference internal"href="../wrappers/misc_wrappers/#gymnasium.wrappers.PassiveEnvChecker"title="gymnasium.wrappers.PassiveEnvChecker"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">gymnasium.wrappers.PassiveEnvChecker</span></code></a> to the environment.</p></li>
<li><p><strong>apply_api_compatibility</strong>– If to apply the <aclass="reference internal"href="../wrappers/misc_wrappers/#gymnasium.wrappers.StepAPICompatibility"title="gymnasium.wrappers.StepAPICompatibility"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">gymnasium.wrappers.StepAPICompatibility</span></code></a> wrapper to the environment.
Use if the environment is implemented in the gym v0.21 environment API.</p></li>
<li><p><strong>additional_wrappers</strong>– Additional wrappers to apply the environment.</p></li>
<li><p><strong>vector_entry_point</strong>– The entry point for creating the vector environment</p></li>
<li><p><strong>**kwargs</strong>– arbitrary keyword arguments which are passed to the environment constructor on initialisation.</p></li>
<spanclass="sig-prename descclassname"><spanclass="pre">gymnasium.</span></span><spanclass="sig-name descname"><spanclass="pre">spec</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">env_id</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><aclass="reference internal"href="#gymnasium.envs.registration.EnvSpec"title="gymnasium.envs.registration.EnvSpec"><spanclass="pre">EnvSpec</span></a></span></span><aclass="headerlink"href="#gymnasium.spec"title="Permalink to this definition">#</a></dt>
<dd><p>Retrieve the <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">EnvSpec</span></code> for the environment id from the <codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">registry</span></code>.</p>
<ddclass="field-odd"><p><strong>env_id</strong>– The environment id with the expected format of <codeclass="docutils literal notranslate"><spanclass="pre">[(namespace)/]id[-v(version)]</span></code></p>
<li><p><strong>print_registry</strong>– Environment registry to be printed. By default, <codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">registry</span></code></p></li>
<emclass="property"><spanclass="pre">class</span><spanclass="w"></span></em><spanclass="sig-prename descclassname"><spanclass="pre">gymnasium.envs.registration.</span></span><spanclass="sig-name descname"><spanclass="pre">EnvSpec</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">id:</span><spanclass="pre">str</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">entry_point:</span><spanclass="pre">EnvCreator</span><spanclass="pre">|</span><spanclass="pre">str</span><spanclass="pre">|</span><spanclass="pre">None</span><spanclass="pre">=</span><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">reward_threshold:</span><spanclass="pre">float</span><spanclass="pre">|</span><spanclass="pre">None</span><spanclass="pre">=</span><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">nondeterministic:</span><spanclass="pre">bool</span><spanclass="pre">=</span><spanclass="pre">False</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">max_episode_steps:</span><spanclass="pre">int</span><spanclass="pre">|</span><spanclass="pre">None</span><spanclass="pre">=</span><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">order_enforce:</span><spanclass="pre">bool</span><spanclass="pre">=</span><spanclass="pre">True</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">autoreset:</span><spanclass="pre">bool</span><spanclass="pre">=</span><spanclass="pre">False</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">disable_env_checker:</span><spanclass="pre">bool</span><spanclass="pre">=</span><spanclass="pre">False</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">apply_api_compatibility:</span><spanclass="pre">bool</span><spanclass="pre">=</span><spanclass="pre">False</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">kwargs:</span><spanclass="pre">dict</span><spanclass="pre">=</span><spanclass="pre"><factory></span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">additional_wrappers:</span><spanclass="pre">tuple[WrapperSpec</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">...]</span><spanclass="pre">=</span><spanclass="pre"><factory></span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">vector_entry_point:</span><spanclass="pre">VectorEnvCreator</span><spanclass="pre">|</span><spanclass="pre">str</span><spanclass="pre">|</span><spanclass="pre">None</span><spanclass="pre">=</span><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#gymnasium.envs.registration.EnvSpec"title="Permalink to this definition">#</a></dt>
<dd><p>A specification for creating environments with <aclass="reference internal"href="#gymnasium.make"title="gymnasium.make"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.make()</span></code></a>.</p>
<ulclass="simple">
<li><p><strong>id</strong>: The string used to create the environment with <aclass="reference internal"href="#gymnasium.make"title="gymnasium.make"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.make()</span></code></a></p></li>
<li><p><strong>entry_point</strong>: A string for the environment location, <codeclass="docutils literal notranslate"><spanclass="pre">(import</span><spanclass="pre">path):(environment</span><spanclass="pre">name)</span></code> or a function that creates the environment.</p></li>
<li><p><strong>reward_threshold</strong>: The reward threshold for completing the environment.</p></li>
<li><p><strong>nondeterministic</strong>: If the observation of an environment cannot be repeated with the same initial state, random number generator state and actions.</p></li>
<li><p><strong>max_episode_steps</strong>: The max number of steps that the environment can take before truncation</p></li>
<li><p><strong>order_enforce</strong>: If to enforce the order of <aclass="reference internal"href="../env/#gymnasium.Env.reset"title="gymnasium.Env.reset"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.Env.reset()</span></code></a> before <aclass="reference internal"href="../env/#gymnasium.Env.step"title="gymnasium.Env.step"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.Env.step()</span></code></a> and <aclass="reference internal"href="../env/#gymnasium.Env.render"title="gymnasium.Env.render"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.Env.render()</span></code></a> functions</p></li>
<li><p><strong>autoreset</strong>: If to automatically reset the environment on episode end</p></li>
<li><p><strong>disable_env_checker</strong>: If to disable the environment checker wrapper in <aclass="reference internal"href="#gymnasium.make"title="gymnasium.make"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.make()</span></code></a>, by default False (runs the environment checker)</p></li>
<li><p><strong>kwargs</strong>: Additional keyword arguments passed to the environment during initialisation</p></li>
<li><p><strong>additional_wrappers</strong>: A tuple of additional wrappers applied to the environment (WrapperSpec)</p></li>
<li><p><strong>vector_entry_point</strong>: The location of the vectorized environment to create from</p></li>
<spanclass="sig-prename descclassname"><spanclass="pre">gymnasium.envs.registration.</span></span><spanclass="sig-name descname"><spanclass="pre">registry</span></span><aclass="headerlink"href="#gymnasium.envs.registration.registry"title="Permalink to this definition">#</a></dt>
<dd><p>The Global registry for gymnasium which is where environment specifications are stored by <aclass="reference internal"href="#gymnasium.register"title="gymnasium.register"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.register()</span></code></a> and from which <aclass="reference internal"href="#gymnasium.make"title="gymnasium.make"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">gymnasium.make()</span></code></a> is used to create environments.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">gymnasium.envs.registration.</span></span><spanclass="sig-name descname"><spanclass="pre">current_namespace</span></span><aclass="headerlink"href="#gymnasium.envs.registration.current_namespace"title="Permalink to this definition">#</a></dt>
<dd><p>The current namespace when creating or registering environments. This is by default <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code> by with <aclass="reference internal"href="#gymnasium.envs.registration.namespace"title="gymnasium.envs.registration.namespace"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">namespace()</span></code></a> this can be modified to automatically set the environment id namespace.</p>
</dd></dl>
</section>
<sectionid="additional-functions">
<h2>Additional functions<aclass="headerlink"href="#additional-functions"title="Permalink to this heading">#</a></h2>
<spanclass="sig-prename descclassname"><spanclass="pre">gymnasium.envs.registration.</span></span><spanclass="sig-name descname"><spanclass="pre">get_env_id</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">ns</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">name</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">version</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">int</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">str</span></span></span><aclass="headerlink"href="#gymnasium.envs.registration.get_env_id"title="Permalink to this definition">#</a></dt>
<dd><p>Get the full env ID given a name and (optional) version and namespace. Inverse of <aclass="reference internal"href="#gymnasium.envs.registration.parse_env_id"title="gymnasium.envs.registration.parse_env_id"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">parse_env_id()</span></code></a>.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">gymnasium.envs.registration.</span></span><spanclass="sig-name descname"><spanclass="pre">parse_env_id</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">env_id</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">tuple</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">str</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span><spanclass="p"><spanclass="pre">,</span></span><spanclass="w"></span><spanclass="pre">str</span><spanclass="p"><spanclass="pre">,</span></span><spanclass="w"></span><spanclass="pre">int</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span><spanclass="p"><spanclass="pre">]</span></span></span></span><aclass="headerlink"href="#gymnasium.envs.registration.parse_env_id"title="Permalink to this definition">#</a></dt>
<dd><p>Parse environment ID string format - <codeclass="docutils literal notranslate"><spanclass="pre">[namespace/](env-name)[-v(version)]</span></code> where the namespace and version are optional.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">gymnasium.envs.registration.</span></span><spanclass="sig-name descname"><spanclass="pre">find_highest_version</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">ns</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">name</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">int</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span></span><aclass="headerlink"href="#gymnasium.envs.registration.find_highest_version"title="Permalink to this definition">#</a></dt>
<dd><p>Finds the highest registered version of the environment given the namespace and name in the registry.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">gymnasium.envs.registration.</span></span><spanclass="sig-name descname"><spanclass="pre">namespace</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">ns</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#gymnasium.envs.registration.namespace"title="Permalink to this definition">#</a></dt>
<dd><p>Context manager for modifying the current namespace.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">gymnasium.envs.registration.</span></span><spanclass="sig-name descname"><spanclass="pre">load_env_creator</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">name</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">EnvCreator</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">VectorEnvCreator</span></span></span><aclass="headerlink"href="#gymnasium.envs.registration.load_env_creator"title="Permalink to this definition">#</a></dt>
<dd><p>Loads an environment with name of style <codeclass="docutils literal notranslate"><spanclass="pre">"(import</span><spanclass="pre">path):(environment</span><spanclass="pre">name)"</span></code> and returns the environment creation function, normally the environment class type.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">gymnasium.envs.registration.</span></span><spanclass="sig-name descname"><spanclass="pre">load_plugin_envs</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">entry_point</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">'gymnasium.envs'</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#gymnasium.envs.registration.load_plugin_envs"title="Permalink to this definition">#</a></dt>
<dd><p>Load modules (plugins) using the gymnasium entry points in order to register external module’s environments on <codeclass="docutils literal notranslate"><spanclass="pre">import</span><spanclass="pre">gymnasium</span></code>.</p>