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

register_envs overwrites names of original Atari Envs #21

Open
shivakanthsujit opened this issue Jul 17, 2022 · 1 comment
Open

register_envs overwrites names of original Atari Envs #21

shivakanthsujit opened this issue Jul 17, 2022 · 1 comment

Comments

@shivakanthsujit
Copy link

In the register_envs function, the name given to the classes does not include "MinAtar/". Because of this, if you call register_envs, it will overwrite the names of the original ALE games. This also means that calling gym.make("MinAtar/Breakout-v0") or any other game doesn't work since there are no registered envs starting with "MinAtar". The bug is in

MinAtar/minatar/gym.py

Lines 58 to 70 in 2a12fc8

def register_envs():
for game in ["asterix", "breakout", "freeway", "seaquest", "space_invaders"]:
name = game.title().replace('_', '')
register(
id="{}-v0".format(name),
entry_point="minatar.gym:BaseEnv",
kwargs=dict(game=game, display_time=50, use_minimal_action_set=False),
)
register(
id="{}-v1".format(name),
entry_point="minatar.gym:BaseEnv",
kwargs=dict(game=game, display_time=50, use_minimal_action_set=True),
)

It can be fixed by just modifying "id="{}-v0".format(name)," to "id="MinAtar/{}-v0".format(name)," for both v0 and v1.

I can open a PR for this if you like.

@kenjyoung
Copy link
Owner

I've used commands like gym.make("MinAtar/Breakout-v0") and they seem to work as intended for me.

Are you using a sufficiently recent version of gym that includes the plugin system? For example <pip install gym==0.21.0> as mentioned in the README?

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

No branches or pull requests

2 participants