This commit is contained in:
pseudo-rnd-thoughts
2022-10-26 10:15:11 +00:00
parent ac0c7753c1
commit b5f95e10d9
3 changed files with 3 additions and 3 deletions

View File

@@ -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 environments 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 environments 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>

View File

@@ -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">&quot;GymV26Environment-v0&quot;</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">&quot;GymV26Environment-v0&quot;</span><span class="p">,</span> <span class="n">env_name</span><span class="o">=</span><span class="s2">&quot;ALE/Pong-v5&quot;</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">&quot;GymV26Environment-v0&quot;</span><span class="p">,</span> <span class="n">env_id</span><span class="o">=</span><span class="s2">&quot;ALE/Pong-v5&quot;</span><span class="p">)</span>
</pre></div>
</div>
</section>

File diff suppressed because one or more lines are too long