-
Notifications
You must be signed in to change notification settings - Fork 68
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
Gymnasium support #94
base: master
Are you sure you want to change the base?
Conversation
gymnasium 0.27 Discrete space returns np.int64 instead of int
relies on Kautenja/nes-py#94 also commented out a group of unit tests on the registration as they are irrelevant since ~2019, when access to attributes starting with an underscore was prohibited.
Also added None as a default option for render_mode. Also separated between terminated and truncated instead of a single done internally.
@@ -85,7 +95,8 @@ class NESEnv(gym.Env): | |||
|
|||
# relevant meta-data about the environment | |||
metadata = { | |||
'render.modes': ['rgb_array', 'human'], | |||
'render_modes': ['rgb_array', 'human'], | |||
'render_fps': 60, | |||
'video.frames_per_second': 60 |
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.
I believe video.frames_per_second
can be dropped in favor of render_fps
(as seen here).
'video.frames_per_second': 60 |
Just make sure to update the sole reference I saw to it here to be target_frame_duration = 1 / env.metadata['render_fps']
.
Thanks for keeping your fork up-to-date. I've been basically maintaining my own fork on the side as well so I can play around with RL and NES games.
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.
I've been using the changes in this fork for a few weeks successfully. It'd be nice to get a review and merge on this!
Description
Readjusted all code including unit tests to support Gymnasium and its API changes.
Drops support for older gym.
Based on #87 and its code review.
As well as #93.
Type of change
Please select all relevant options:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.1.0
Thread model: posix
Checklist