Skip to content

Commit

Permalink
Deploying to gh-pages from @ 1878f6d 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts committed Jul 16, 2024
1 parent 261b92c commit 3415bf6
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion main/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 0057bee6aeeea0083f5a6611bdc91eef
config: b0c1d968f31d15845d55ba5aebe4cd90
tags: d77d1c0d9ca2f4c8421862c7c5a0d620
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ <h1>Source code for gymnasium.wrappers.vector.dict_info_to_list</h1><div class="
<span class="sd"> Example for vector environments:</span>
<span class="sd"> &gt;&gt;&gt; import numpy as np</span>
<span class="sd"> &gt;&gt;&gt; import gymnasium as gym</span>
<span class="sd"> &gt;&gt;&gt; from gymnasium.spaces import Dict, Box</span>
<span class="sd"> &gt;&gt;&gt; envs = gym.make_vec(&quot;CartPole-v1&quot;, num_envs=3)</span>
<span class="sd"> &gt;&gt;&gt; obs, info = envs.reset(seed=123)</span>
<span class="sd"> &gt;&gt;&gt; info</span>
Expand All @@ -535,7 +534,7 @@ <h1>Source code for gymnasium.wrappers.vector.dict_info_to_list</h1><div class="
<span class="sd"> &gt;&gt;&gt; _ = envs.action_space.seed(123)</span>
<span class="sd"> &gt;&gt;&gt; _, _, _, _, infos = envs.step(envs.action_space.sample())</span>
<span class="sd"> &gt;&gt;&gt; infos</span>
<span class="sd"> [{&#39;x_position&#39;: np.float64(0.03332210900362942), &#39;x_velocity&#39;: np.float64(-0.06296527291998533), &#39;reward_run&#39;: np.float64(-0.06296527291998533), &#39;reward_ctrl&#39;: np.float32(-0.24503504)}, {&#39;x_position&#39;: np.float64(0.10172354684460168), &#39;x_velocity&#39;: np.float64(0.8934584807363618), &#39;reward_run&#39;: np.float64(0.8934584807363618), &#39;reward_ctrl&#39;: np.float32(-0.21944423)}]</span>
<span class="sd"> [{&#39;x_position&#39;: np.float64(0.0333221090036294), &#39;x_velocity&#39;: np.float64(-0.06296527291998574), &#39;reward_run&#39;: np.float64(-0.06296527291998574), &#39;reward_ctrl&#39;: np.float32(-0.24503504)}, {&#39;x_position&#39;: np.float64(0.10172354684460168), &#39;x_velocity&#39;: np.float64(0.8934584807363618), &#39;reward_run&#39;: np.float64(0.8934584807363618), &#39;reward_ctrl&#39;: np.float32(-0.21944423)}]</span>

<span class="sd"> Change logs:</span>
<span class="sd"> * v0.24.0 - Initially added as ``VectorListInfo``</span>
Expand Down
3 changes: 1 addition & 2 deletions main/api/vector/wrappers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,6 @@ <h2>Vector Only wrappers<a class="headerlink" href="#vector-only-wrappers" title
<dl>
<dt>Example for vector environments:</dt><dd><div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">gymnasium</span> <span class="k">as</span> <span class="nn">gym</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">gymnasium.spaces</span> <span class="kn">import</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">Box</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">envs</span> <span class="o">=</span> <span class="n">gym</span><span class="o">.</span><span class="n">make_vec</span><span class="p">(</span><span class="s2">&quot;CartPole-v1&quot;</span><span class="p">,</span> <span class="n">num_envs</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obs</span><span class="p">,</span> <span class="n">info</span> <span class="o">=</span> <span class="n">envs</span><span class="o">.</span><span class="n">reset</span><span class="p">(</span><span class="n">seed</span><span class="o">=</span><span class="mi">123</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">info</span>
Expand All @@ -652,7 +651,7 @@ <h2>Vector Only wrappers<a class="headerlink" href="#vector-only-wrappers" title
<span class="gp">&gt;&gt;&gt; </span><span class="n">_</span> <span class="o">=</span> <span class="n">envs</span><span class="o">.</span><span class="n">action_space</span><span class="o">.</span><span class="n">seed</span><span class="p">(</span><span class="mi">123</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">_</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">infos</span> <span class="o">=</span> <span class="n">envs</span><span class="o">.</span><span class="n">step</span><span class="p">(</span><span class="n">envs</span><span class="o">.</span><span class="n">action_space</span><span class="o">.</span><span class="n">sample</span><span class="p">())</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">infos</span>
<span class="go">[{&#39;x_position&#39;: np.float64(0.03332210900362942), &#39;x_velocity&#39;: np.float64(-0.06296527291998533), &#39;reward_run&#39;: np.float64(-0.06296527291998533), &#39;reward_ctrl&#39;: np.float32(-0.24503504)}, {&#39;x_position&#39;: np.float64(0.10172354684460168), &#39;x_velocity&#39;: np.float64(0.8934584807363618), &#39;reward_run&#39;: np.float64(0.8934584807363618), &#39;reward_ctrl&#39;: np.float32(-0.21944423)}]</span>
<span class="go">[{&#39;x_position&#39;: np.float64(0.0333221090036294), &#39;x_velocity&#39;: np.float64(-0.06296527291998574), &#39;reward_run&#39;: np.float64(-0.06296527291998574), &#39;reward_ctrl&#39;: np.float32(-0.24503504)}, {&#39;x_position&#39;: np.float64(0.10172354684460168), &#39;x_velocity&#39;: np.float64(0.8934584807363618), &#39;reward_run&#39;: np.float64(0.8934584807363618), &#39;reward_ctrl&#39;: np.float32(-0.21944423)}]</span>
</pre></div>
</div>
</dd>
Expand Down
2 changes: 1 addition & 1 deletion main/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 3415bf6

Please sign in to comment.