Farama-Foundation / Minigrid

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

In the BlockedUnlockPickupEnv, interacting with an empty box deletes the box, and creates an unsolvable situation. #447

Open AdrianOrenstein opened 3 months ago

AdrianOrenstein commented 3 months ago

Description

This PR concerns a sequence of actions in the BlockedUnlockPickupEnv environment that will make an unsolvable situation in this environment. This environment requires the player to first move the obstacle out of the way, unlock the door, and then pick up the box. If instead, the agent interacts with the box and does not pick up the box, the box will be replaced with a None object and the box is subsequently deleted. In this environment, if the box is deleted by interacting with the box, the environment becomes unsolvable.

If this environment becomes unsolvable, the level and will require a reset or timeout. This PR changes the toggle behaviour of boxes to do nothing if the box is empty, preventing an agent from accidentally deleting boxes and creating an unsolvable situation.

Type of change

Checklist:

pseudo-rnd-thoughts commented 3 months ago

Thanks for the PR, could you provide a test for show this example of the box disappearing. This doesn't seem to be the correct solution, I would be trying to solve that rather than the current solution