Farama-Foundation / Minigrid

Simple and easily configurable grid world environments for reinforcement learning
https://minigrid.farama.org/
Other
2.09k stars 604 forks source link

Make sure ObstructedMaze is solvable. #334

Closed SigmaBM closed 1 year ago

SigmaBM commented 1 year ago

Description

The blocking ball placed by the add_door may cover the box placed on the map by previous add_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:

SigmaBM commented 1 year ago

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.

pseudo-rnd-thoughts commented 1 year ago

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 minigrid/__init__.py I believe and also update the documentation for the changes from v0 to v1

For testing, could you put it in tests/test_obstructed_maze.py

SigmaBM commented 1 year ago

I update the version number of related ObstructedMaze envs and the document. A test file is available in tests/test_obstructed_maze.py.