Skip to content

Commit

Permalink
Changed the data type of grid so that strings could be added to the n…
Browse files Browse the repository at this point in the history
…umpy array without throwing an error. Increased the dimensions of grid since pieces could be moved one step beyond its previous boundaries.
  • Loading branch information
mariojerez committed Nov 10, 2024
1 parent cb56618 commit 3b45bb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tutorials/CustomEnvironment/tutorial3_action_masking.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def step(self, actions):

def render(self):
"""Renders the environment."""
grid = np.zeros((7, 7))
grid = np.zeros((8, 8), dtype=object)
grid[self.prisoner_y, self.prisoner_x] = "P"
grid[self.guard_y, self.guard_x] = "G"
grid[self.escape_y, self.escape_x] = "E"
Expand Down

0 comments on commit 3b45bb7

Please sign in to comment.