-
-
Notifications
You must be signed in to change notification settings - Fork 615
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
Make sure ObstructedMaze is solvable. #334
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you
- Provide a test to show the number of environments that are not solvable out of 10,000?
- update the version numbers for all Obstructed Maze
- Add a test to check if the environment is solvable and run 10 times in the tests.
Could you please clarify if "update the version numbers" means changing from "v0" to "v1"? Also, which directory should I place the test files? Thank you. |
Yes, just updated the registration version number, see For testing, could you put it in |
I update the version number of related ObstructedMaze envs and the document. A test file is available in |
minigrid/envs/obstructedmaze.py
Outdated
@@ -58,16 +58,21 @@ class ObstructedMazeEnv(RoomGrid): | |||
"Q" number of quarters that will have doors and keys out of the 9 that the | |||
map already has. | |||
"Full" 3x3 maze with "h" and "b" options. | |||
"v1" prevent the key from being covered by the blocking ball. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you update to explain why only some of the environments are updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test, test_solvable_env
that the env_test
for the v1 envs have a unsolvable == 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think this is good.
Description
The blocking ball placed by the
add_door
may cover the box placed on the map by previousadd_door
, causing the agent to be unable to open certain door and unable to complete the task. To make sure this environment solvable, we can first place all the doors and their blocking balls, and then place the keys, so that it ensures that the keys will not be covered by the blocking balls added later.Fixes # 323
Type of change
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist:
pre-commit
checks withpre-commit run --all-files
(seeCONTRIBUTING.md
instructions to set it up)