瀏覽代碼

In the new gym api, reset takes two extra arguments. This removes some warnings.

saleml 2 年之前
父節點
當前提交
22b50565dd
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      gym_minigrid/minigrid.py

+ 2 - 1
gym_minigrid/minigrid.py

@@ -728,7 +728,8 @@ class MiniGridEnv(gym.Env):
         # Initialize the state
         self.reset()
 
-    def reset(self):
+    def reset(self, *, seed=None, return_info=False, options=None):
+        super().reset(seed=seed)
         # Current position and direction of the agent
         self.agent_pos = None
         self.agent_dir = None