mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-30 01:50:19 +00:00
Deploying to gh-pages from @ Farama-Foundation/Gymnasium@a5d885bb5b 🚀
This commit is contained in:
@@ -530,7 +530,7 @@
|
||||
</section>
|
||||
<section id="non-atari-env">
|
||||
<h4>Non-Atari env<a class="headerlink" href="#non-atari-env" title="Permalink to this heading">#</a></h4>
|
||||
<p>Ensure the environment is in Gymnasium (or your fork). Ensure that the environment’s Python file has a properly formatted markdown docstring. Pip install Gymnasium (or your fork) then run <code class="docutils literal notranslate"><span class="pre">docs/scripts/gen_mds.py</span></code>. This will automatically generate an md page for the environment. Then complete the <span class="xref myst">other steps</span>.</p>
|
||||
<p>Ensure the environment is in Gymnasium (or your fork). Ensure that the environment’s Python file has a properly formatted markdown docstring. Pip install Gymnasium (or your fork) then run <code class="docutils literal notranslate"><span class="pre">docs/scripts/gen_mds.py</span></code>. This will automatically generate a md page for the environment. Then complete the <span class="xref myst">other steps</span>.</p>
|
||||
</section>
|
||||
<section id="other-steps">
|
||||
<h4>Other steps<a class="headerlink" href="#other-steps" title="Permalink to this heading">#</a></h4>
|
||||
|
@@ -519,7 +519,7 @@
|
||||
<p>For environments that are registered solely in OpenAI Gym, it is still possible to import environments within Gymnasium however they will not appear in the gymnasium environment registry. Introduced in Gymnasium v0.26.3, using the special environment <code class="docutils literal notranslate"><span class="pre">"GymV26Environment-v0"</span></code>, passing an <code class="docutils literal notranslate"><span class="pre">env_name</span></code> along with any other keyword will be passed to <code class="docutils literal notranslate"><span class="pre">gym.make</span></code>. This environment, <a class="reference internal" href="../../api/wrappers/misc_wrappers/#gymnasium.wrappers.EnvCompatibility" title="gymnasium.wrappers.EnvCompatibility"><code class="xref py py-class docutils literal notranslate"><span class="pre">EnvCompatibility</span></code></a>, is also compatibility with passing gym environment instances with the <code class="docutils literal notranslate"><span class="pre">env</span></code> keyword.</p>
|
||||
<p>An example of this is atari 0.8.0 which does not have a gymnasium implementation.</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">gymnasium</span> <span class="k">as</span> <span class="nn">gym</span>
|
||||
<span class="n">env</span> <span class="o">=</span> <span class="n">gym</span><span class="o">.</span><span class="n">make</span><span class="p">(</span><span class="s2">"GymV26Environment-v0"</span><span class="p">,</span> <span class="n">env_name</span><span class="o">=</span><span class="s2">"ALE/Pong-v5"</span><span class="p">)</span>
|
||||
<span class="n">env</span> <span class="o">=</span> <span class="n">gym</span><span class="o">.</span><span class="n">make</span><span class="p">(</span><span class="s2">"GymV26Environment-v0"</span><span class="p">,</span> <span class="n">env_id</span><span class="o">=</span><span class="s2">"ALE/Pong-v5"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user