Skip to content
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

Remove AtariEnv in favour of official ALE Python package #2348

Merged
merged 3 commits into from
Sep 11, 2021
Merged

Remove AtariEnv in favour of official ALE Python package #2348

merged 3 commits into from
Sep 11, 2021

Conversation

JesseFarebro
Copy link
Contributor

This PR removes atari-py in favour of the official ALE package ale-py. More information can be found in Farama-Foundation/Arcade-Learning-Environment#382.

The major changes to Gym will be as follows:

  • ROMs are no longer packaged as part of atari-py. The current solution is to use python -m atari_py.import_roms. The new ale-py method of importing ROMs will be the shell command ale-import-roms.

  • clone_state(), clone_full_state() will return the actual ALEState object now instead of an object meant for serialization. This should have no impact on users as ALEState can be Pickled and serialized without issues.

  • It is now recommended to use gym.make('AtariID', render_mode='human') instead of env.render(mode='human') for both render modes. ale-py shipps now with SDL2 and supports full 60FPS viewing, audio, scaling, etc. You don't get this by using env.render()

  • Environment defaults have changed: frameskip = 5, repeat_action_probability = 0.25, full_action_space = True. This follows the most recent methodology set out in Machado et al. 2018. This has no impact on the existing Gym IDs which remain unchanged.

It's worth noting that as far as users are concerned everything is backwards compatible. ale-py will still search for ROMs that were imported via atari-py and the environment parameters for v0 and v4 haven't been changed.

@jkterry1
Copy link
Collaborator

@JesseFarebro I believe the version of ALE-Py needs to be pegged instead of just specifying a minimum version since this impacts environment logic?

@jkterry1
Copy link
Collaborator

For additional context, the problem with Atari-Py is that it used an incredibly out of date version of the ALE with many now fixed inconsistencies, bugs and performance issues. This has been a planned upgrade to Gym for something like 2 years now.

setup.py Outdated Show resolved Hide resolved
@@ -758,7 +757,7 @@ def _merge(a, b):
"yars_revenge",
"zaxxon",
]:
for obs_type in ["image", "ram"]:
for obs_type in ["rgb", "ram"]:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ALGymEnv still accepts image as an obs_type but will display a deprecation warning asking the user to switch to one of: rgb or grayscale.

gym/envs/__init__.py Outdated Show resolved Hide resolved
@JesseFarebro JesseFarebro marked this pull request as ready for review August 23, 2021 20:28
setup.py Outdated Show resolved Hide resolved
@jkterry1 jkterry1 mentioned this pull request Aug 24, 2021
@jkterry1
Copy link
Collaborator

jkterry1 commented Aug 27, 2021

@JesseFarebro you said that opencv would be removed from all the Atari environments, but it's still living there (at least in setup.py for [atari])

@JesseFarebro
Copy link
Contributor Author

@jkterry1 so I was mistaken where OpenCV was used. It's used in the AtariPreprocessing wrapper to do image resizing. This wrapper won't be changing for the time being. Eventually, we'll be able to remove the wrapper and dependency on OpenCV but that's down the road.

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.

None yet

2 participants