Skip to content

Commit

Permalink
Deploying to gh-pages from @ fa446b3 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts committed Aug 19, 2024
1 parent 1333252 commit 6a91da2
Show file tree
Hide file tree
Showing 42 changed files with 269 additions and 272 deletions.
Binary file modified main/_images/index_1_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/index_2_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/index_2_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/index_2_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/index_3_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/quickstart_0_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/quickstart_2_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion main/_modules/highway_env/__init__/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ <h1>Source code for highway_env.__init__</h1><div class="highlight"><pre>

<span class="kn">from</span> <span class="nn">gymnasium.envs.registration</span> <span class="kn">import</span> <span class="n">register</span>

<span class="n">__version__</span> <span class="o">=</span> <span class="s2">&quot;1.10.0&quot;</span>

<span class="n">__version__</span> <span class="o">=</span> <span class="s2">&quot;2.0.0&quot;</span>

<span class="k">try</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">farama_notifications</span> <span class="kn">import</span> <span class="n">notifications</span>
Expand Down
44 changes: 23 additions & 21 deletions main/_modules/highway_env/envs/common/abstract/index.html

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions main/_modules/highway_env/envs/common/action/index.html

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions main/_modules/highway_env/envs/common/graphics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,10 @@
<article role="main">

<h1>Source code for highway_env.envs.common.graphics</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">TYPE_CHECKING</span><span class="p">,</span> <span class="n">Callable</span><span class="p">,</span> <span class="n">List</span><span class="p">,</span> <span class="n">Optional</span>
<span></span><span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">annotations</span>

<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">TYPE_CHECKING</span><span class="p">,</span> <span class="n">Callable</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">pygame</span>
Expand All @@ -305,21 +307,21 @@ <h1>Source code for highway_env.envs.common.graphics</h1><div class="highlight">
<span class="kn">from</span> <span class="nn">highway_env.road.graphics</span> <span class="kn">import</span> <span class="n">RoadGraphics</span><span class="p">,</span> <span class="n">WorldSurface</span>
<span class="kn">from</span> <span class="nn">highway_env.vehicle.graphics</span> <span class="kn">import</span> <span class="n">VehicleGraphics</span>


<span class="k">if</span> <span class="n">TYPE_CHECKING</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">highway_env.envs</span> <span class="kn">import</span> <span class="n">AbstractEnv</span>
<span class="kn">from</span> <span class="nn">highway_env.envs.common.abstract</span> <span class="kn">import</span> <span class="n">Action</span>


<div class="viewcode-block" id="EnvViewer">
<a class="viewcode-back" href="../../../../../graphics/#highway_env.envs.common.graphics.EnvViewer">[docs]</a>
<span class="k">class</span> <span class="nc">EnvViewer</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>

<span class="k">class</span> <span class="nc">EnvViewer</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;A viewer to render a highway driving environment.&quot;&quot;&quot;</span>

<span class="n">SAVE_IMAGES</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">agent_display</span> <span class="o">=</span> <span class="kc">None</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">env</span><span class="p">:</span> <span class="s2">&quot;AbstractEnv&quot;</span><span class="p">,</span> <span class="n">config</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">dict</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">env</span><span class="p">:</span> <span class="n">AbstractEnv</span><span class="p">,</span> <span class="n">config</span><span class="p">:</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">env</span> <span class="o">=</span> <span class="n">env</span>
<span class="bp">self</span><span class="o">.</span><span class="n">config</span> <span class="o">=</span> <span class="n">config</span> <span class="ow">or</span> <span class="n">env</span><span class="o">.</span><span class="n">config</span>
<span class="bp">self</span><span class="o">.</span><span class="n">offscreen</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;offscreen_rendering&quot;</span><span class="p">]</span>
Expand Down Expand Up @@ -386,7 +388,7 @@ <h1>Source code for highway_env.envs.common.graphics</h1><div class="highlight">

<div class="viewcode-block" id="EnvViewer.set_agent_action_sequence">
<a class="viewcode-back" href="../../../../../graphics/#highway_env.envs.common.graphics.EnvViewer.set_agent_action_sequence">[docs]</a>
<span class="k">def</span> <span class="nf">set_agent_action_sequence</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">actions</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="s2">&quot;Action&quot;</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">set_agent_action_sequence</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">actions</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="n">Action</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Set the sequence of actions chosen by the agent, so that it can be displayed</span>

Expand Down Expand Up @@ -466,7 +468,7 @@ <h1>Source code for highway_env.envs.common.graphics</h1><div class="highlight">
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">SAVE_IMAGES</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">directory</span><span class="p">:</span>
<span class="n">pygame</span><span class="o">.</span><span class="n">image</span><span class="o">.</span><span class="n">save</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">sim_surface</span><span class="p">,</span>
<span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">directory</span> <span class="o">/</span> <span class="s2">&quot;highway-env_</span><span class="si">{}</span><span class="s2">.png&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">frame</span><span class="p">)),</span>
<span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">directory</span> <span class="o">/</span> <span class="sa">f</span><span class="s2">&quot;highway-env_</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">frame</span><span class="si">}</span><span class="s2">.png&quot;</span><span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">frame</span> <span class="o">+=</span> <span class="mi">1</span></div>

Expand Down Expand Up @@ -509,7 +511,7 @@ <h1>Source code for highway_env.envs.common.graphics</h1><div class="highlight">



<span class="k">class</span> <span class="nc">EventHandler</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">class</span> <span class="nc">EventHandler</span><span class="p">:</span>
<span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">handle_event</span><span class="p">(</span>
<span class="bp">cls</span><span class="p">,</span> <span class="n">action_type</span><span class="p">:</span> <span class="n">ActionType</span><span class="p">,</span> <span class="n">event</span><span class="p">:</span> <span class="n">pygame</span><span class="o">.</span><span class="n">event</span><span class="o">.</span><span class="n">EventType</span>
Expand Down Expand Up @@ -566,7 +568,7 @@ <h1>Source code for highway_env.envs.common.graphics</h1><div class="highlight">
<span class="n">action_type</span><span class="o">.</span><span class="n">act</span><span class="p">(</span><span class="n">action</span><span class="p">)</span>


<span class="k">class</span> <span class="nc">ObservationGraphics</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">class</span> <span class="nc">ObservationGraphics</span><span class="p">:</span>
<span class="n">COLOR</span> <span class="o">=</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>

<span class="nd">@classmethod</span>
Expand Down
Loading

0 comments on commit 6a91da2

Please sign in to comment.