Skip to content

[Bug Report] Setting goal_cell in point_maze causes an error #163

@gauthamvasan

Description

@gauthamvasan

Describe the bug
Indexing error in point_maze assertion. When I pass the "goal_cell" as a 2D numpy array via the options dict as required here, I get this error:

  File "/home/vasan/RL/lib/python3.10/site-packages/gymnasium_robotics/envs/maze/maze.py", line 294, in reset
    self.maze.maze_map[options["goal_cell"][1], options["goal_cell"][0]]
TypeError: list indices must be integers or slices, not tuple

Solution
It's fairly simple. The array indexing code is broken. The assertion should be:

self.maze.maze_map[options["reset_cell"][1]][options["reset_cell"][0]] != 1

System Info

  • pip install within a conda env
  • MacOS
  • Python 3.10

Checklist

  • I have checked that there is no similar issue in the repo (required)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions