Skip to content

Commit

Permalink
Fix issue when generating non-square DoorKey environments (#429)
Browse files Browse the repository at this point in the history
Co-authored-by: Rafael Bankosegger <[email protected]>
  • Loading branch information
rbankosegger and rbanko authored Apr 22, 2024
1 parent 617e490 commit a7a6725
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion minigrid/envs/doorkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def _gen_grid(self, width, height):
self.place_agent(size=(splitIdx, height))

# Place a door in the wall
doorIdx = self._rand_int(1, width - 2)
doorIdx = self._rand_int(1, height - 2)
self.put_obj(Door("yellow", is_locked=True), splitIdx, doorIdx)

# Place a yellow key on the left side
Expand Down

0 comments on commit a7a6725

Please sign in to comment.