فهرست منبع

Added screenshot to README, fixed issue with standalone.py

Maxime Chevalier-Boisvert 7 سال پیش
والد
کامیت
3e42fe68d3
3فایلهای تغییر یافته به همراه19 افزوده شده و 4 حذف شده
  1. 6 2
      README.md
  2. BIN
      figures/door-key-env.png
  3. 13 2
      standalone.py

+ 6 - 2
README.md

@@ -89,6 +89,10 @@ Registered configurations:
 - `MiniGrid-Door-Key-8x8-v0`
 - `MiniGrid-Door-Key-16x16-v0`
 
+<p align="center">
+<img src="/figures/door-key-env.png">
+</p>
+
 This environment has a key that the agent must pick up in order to unlock
 a goal and then get to the green goal square. This environment is difficult,
 because of the sparse reward, to solve using classical RL algorithms. It is
@@ -99,7 +103,7 @@ useful to experiment with curiosity or curriculum learning.
 Registered configurations:
 - `MiniGrid-Multi-Room-N6-v0`
 
-<p align="center"> 
+<p align="center">
 <img src="/figures/multi-room.gif" width=416 height=424>
 </p>
 
@@ -114,7 +118,7 @@ rooms and building a curriculum, the environment can be solved.
 Registered configurations:
 - `MiniGrid-Fetch-8x8-v0`
 
-<p align="center"> 
+<p align="center">
 <img src="/figures/fetch-env.png" width=392 height=269>
 </p>
 

BIN
figures/door-key-env.png


+ 13 - 2
standalone.py

@@ -5,13 +5,24 @@ from __future__ import division, print_function
 import numpy
 import gym
 import time
+from optparse import OptionParser
 
 import gym_minigrid
 from gym_minigrid.envs import MiniGridEnv
 
 def main():
-
-    env = gym.make('MiniGrid-Multi-Room-N6-v0')
+    parser = OptionParser()
+    parser.add_option(
+        "-e",
+        "--env-name",
+        dest="env_name",
+        help="gym environment to load",
+        default='MiniGrid-Multi-Room-N6-v0'
+    )
+    (options, args) = parser.parse_args()
+
+    # Load the gym environment
+    env = gym.make(options.env_name)
     env.reset()
 
     # Create a window to render into