Skip to content

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

Open
AdrianOrenstein wants to merge 7 commits into
Farama-Foundation:mainfrom
AdrianOrenstein:fix-empty-box-removal
Open

In the BlockedUnlockPickupEnv, interacting with an empty box deletes the box, and creates an unsolvable situation.#447
AdrianOrenstein wants to merge 7 commits into
Farama-Foundation:mainfrom
AdrianOrenstein:fix-empty-box-removal

Conversation

@AdrianOrenstein

Copy link
Copy Markdown

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

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
    • I believe there are no relevant docs to update.
  • My changes generate no new warnings
  • 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.
  • New and existing unit tests pass locally with my changes
    • Same as last comment

@pseudo-rnd-thoughts

Copy link
Copy Markdown
Member

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

@jkterry1

jkterry1 commented Jul 6, 2026

Copy link
Copy Markdown
Member

@AdrianOrenstein I know its awhile later, but would you be willing to make the changes that pseudornd requested?

@jkterry1

jkterry1 commented Jul 6, 2026

Copy link
Copy Markdown
Member

This would change the learning behavior so the version of the environment would need to be bumped everywhere, yes?

@AdrianOrenstein

Copy link
Copy Markdown
Author

This would change the learning behavior so the version of the environment would need to be bumped everywhere, yes?

Yes.

@jkterry1

jkterry1 commented Jul 6, 2026 via email

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants