kenjyoung/MinAtar

`register_envs` overwrites names of original Atari Envs

Opened this issue · 1 comments

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.

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?