-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
Randomize LunarLander wind generation at reset to gain statistical independence between episodes #959
Randomize LunarLander wind generation at reset to gain statistical independence between episodes #959
Conversation
…ical independence between epsiodes This will ensure that the environment is statistically independent between episodes, which it is currently not.
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.
We will also need Unit Testing to validate the changes.
@TobiasKallehauge this seems to pass all of our internal testing. Then I think we should be go to merge |
I committed the version change to the documentation and updated the default version used for tests. Let me know if something else should be changed. |
I want to see a unit test validating the change. also Bump the version in registration |
@Kallinteris-Andreas What do you mean? @TobiasKallehauge Could you add a new test in You need to change |
Test if setting the same seed causes same initial wind and torque index. Also testing if setting different seed causes different initial wind and torque index
I added the unit test now, and the seed works as expected - I hope the test complies with your standards. There was still an error in the previous commit for the version due to changing the version number but maybe the new one will pass after changing the tests |
There seems to be a few more places where the version number is referenced:
Right now
I will update the version in all these places (including in the markdown files) - let me know if this is wrong |
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.
Overall this looks good to me.
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 for the PR @TobiasKallehauge and your rapid responses
Thanks to you as well! I am happy to contribute |
Description
This request changes the way
gymnasium/envs/box2d/lunar_lander.py
randomly draws a newwind_idx
andtorque_idx
so new indexes are drawn randomly whenever the environment is reset rather than only at initialization. This ensures that the environment is statistically independent between episodes, which it is currently not. Changed the version fromv2
tov3
and added a unit test to check that the seed is correctly working in the new version.Fixes #954
Type of change
Checklist:
pre-commit
checks withpre-commit run --all-files
(seeCONTRIBUTING.md
instructions to set it up)