Skip to content

Commit

Permalink
Deploying to gh-pages from @ a820287 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
MatPoliquin committed Dec 2, 2023
1 parent a1e2490 commit 0c2a003
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 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: cceae085bfb019d33251f4b814b6a199
config: 69757aec7b33c6ca989df260a43a1b5c
tags: d77d1c0d9ca2f4c8421862c7c5a0d620
7 changes: 4 additions & 3 deletions main/getting_started/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,10 @@ <h3>Random Agent<a class="headerlink" href="#random-agent" title="Link to this h
<span class="n">env</span> <span class="o">=</span> <span class="n">retro</span><span class="o">.</span><span class="n">make</span><span class="p">(</span><span class="n">game</span><span class="o">=</span><span class="s2">&quot;Airstriker-Genesis&quot;</span><span class="p">)</span>
<span class="n">env</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span>
<span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="n">obs</span><span class="p">,</span> <span class="n">rew</span><span class="p">,</span> <span class="n">done</span><span class="p">,</span> <span class="n">info</span> <span class="o">=</span> <span class="n">env</span><span class="o">.</span><span class="n">step</span><span class="p">(</span><span class="n">env</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="n">action</span> <span class="o">=</span> <span class="n">env</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="n">observation</span><span class="p">,</span> <span class="n">reward</span><span class="p">,</span> <span class="n">terminated</span><span class="p">,</span> <span class="n">truncated</span><span class="p">,</span> <span class="n">info</span> <span class="o">=</span> <span class="n">env</span><span class="o">.</span><span class="n">step</span><span class="p">(</span><span class="n">action</span><span class="p">)</span>
<span class="n">env</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
<span class="k">if</span> <span class="n">done</span><span class="p">:</span>
<span class="k">if</span> <span class="n">terminated</span> <span class="ow">or</span> <span class="n">truncated</span><span class="p">:</span>
<span class="n">env</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span>
<span class="n">env</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>

Expand All @@ -345,7 +346,7 @@ <h3>Brute<a class="headerlink" href="#brute" title="Link to this heading">#</a><
<section id="ppo">
<h3>PPO<a class="headerlink" href="#ppo" title="Link to this heading">#</a></h3>
<p>Using <a class="reference external" href="https://arxiv.org/abs/1707.06347">“Proximal Policy Optimization”</a> by Schulman et al., you can train an agent to play many of the games, though it takes awhile and is much faster with a GPU.</p>
<p>This example requires installing <a class="reference external" href="https://github.com/openai/baselines">OpenAI Baselines</a>. Once installed, you can run it:</p>
<p>This example requires installing <a class="reference external" href="https://github.com/DLR-RM/stable-baselines3">Stable Baselines</a>. Once installed, you can run it:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>python3<span class="w"> </span>-m<span class="w"> </span>retro.examples.ppo<span class="w"> </span>--game<span class="w"> </span>Airstriker-Genesis
</pre></div>
</div>
Expand Down
Loading

0 comments on commit 0c2a003

Please sign in to comment.