Skip to content

Commit

Permalink
Updated maze functions to remove improperly scoped calls to maze subr…
Browse files Browse the repository at this point in the history
…outines
  • Loading branch information
Alex Turner committed Sep 21, 2023
1 parent 511cfd6 commit ed83c0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions procgen_tools/maze.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,8 +1004,8 @@ def geometric_probability_path(

def deltas_from(grid: np.ndarray, sq):
"""Returns the deltas between the decision square and the cheese, and the decision square and the top-right corner."""
path_to_cheese = maze.pathfind(grid, sq, maze.get_cheese_pos(grid))
path_to_top_right = maze.pathfind(
path_to_cheese = pathfind(grid, sq, get_cheese_pos(grid))
path_to_top_right = pathfind(
grid, sq, (grid.shape[0] - 1, grid.shape[1] - 1)
)
delta_cheese = (path_to_cheese[1][0] - sq[0], path_to_cheese[1][1] - sq[1])
Expand Down Expand Up @@ -1639,7 +1639,7 @@ def venv_with_all_mouse_positions(venv):
"""
assert (
venv.num_envs == 1
), f"Did you forget to use maze.copy_venv to get a single env?"
), f"Did you forget to use copy_venv to get a single env?"

sb_back = venv.env.callmethod("get_state")[0]
env_state = EnvState(sb_back)
Expand Down

0 comments on commit ed83c0c

Please sign in to comment.