Browse Source

Update roomgrid.py (#176)

Use `==` instead of `is` for literal comparison.
Zhitao Gong 3 years ago
parent
commit
bf4dbaabe6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gym_minigrid/roomgrid.py

+ 1 - 1
gym_minigrid/roomgrid.py

@@ -299,7 +299,7 @@ class RoomGrid(MiniGridEnv):
         while True:
             super().place_agent(room.top, room.size, rand_dir, max_tries=1000)
             front_cell = self.grid.get(*self.front_pos)
-            if front_cell is None or front_cell.type is 'wall':
+            if front_cell is None or front_cell.type == 'wall':
                 break
 
         return self.agent_pos