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
[x] Bug fix (non-breaking change which fixes an issue)
Checklist:
[x] I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
I believe there are no relevant docs to update.
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
I don't believe expected functionality of boxes have tests, this is outside the scope of this PR though.
[x] New and existing unit tests pass locally with my changes
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
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:
pre-commit
checks withpre-commit run --all-files
(seeCONTRIBUTING.md
instructions to set it up)