New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report] Setting goal_cell in point_maze causes an error #163
Comments
which environment revision did you use |
import gymnasium as gym
OPEN_DIVERSE_GR = [
[1, 1, 1, 1, 1, 1, 1],
[1, C, C, C, C, C, 1],
[1, C, C, C, C, C, 1],
[1, C, C, C, C, C, 1],
[1, 1, 1, 1, 1, 1, 1]
]
env = gym.make('PointMaze_UMaze-v3', maze_map=OPEN_DIVERSE_GR) |
@gauthamvasan thanks for reporting this issue. The problem lies in the assertion as you mentioned. The solution you suggest is correct and should be applied to the following lines
@gauthamvasan would you have the time to make a PR? The changes should be applied to Changes will be included in the next release as well, so after the PR is merged I will suggest working with the source code in the mean time. |
Yes, of course! I'll make a PR shortly. Thanks @rodrigodelazcano |
I think there is another error with this assertion statement. In the docs describing the pointmaze variation, it is mentioned that:
This means that "maze_map" is a list of lists. If we provide goal_cell = [i,j] then this should correspond to ith row and the jth column of the "maze_map". But the assertion here checks for the opposite case:
Shouldn't the correct assertion be :
This throws assertion errors whenever we assign valid goals. For example try the following code:
This will throw the following error:
This problem exists in both maze.py and maze_v4.py |
Hey @RajGhugare19 I didn't see this comment since the issue was closed, apologize. And thank you for finding this, you are totally right. I just made a PR that fixes this, #179. |
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:
Solution
It's fairly simple. The array indexing code is broken. The assertion should be:
System Info
Checklist
The text was updated successfully, but these errors were encountered: