diff --git a/README.md b/README.md index 675b719..e36a23b 100644 --- a/README.md +++ b/README.md @@ -73,9 +73,11 @@ Finally, we provide a simple implementations of DQN in `dqn.py` and online actor MinAtar is fully compatible with [Gymnasium](https://gymnasium.farama.org/). A Gymnasium environment can be constructed as follows: ```python +import minatar import gymnasium as gym +minatar.register_envs() # register MinAtar envs with gymnasium env = gym.make('MinAtar/') -```` +``` The following game IDs are available: Asterix-v0, Breakout-v0, Freeway-v0, Seaquest-v0, SpaceInvaders-v0, Asterix-v1, Breakout-v1, Freeway-v1, Seaquest-v1, SpaceInvaders-v1. For each game, in the v0 versions the action set has all 6 available actions (some of which are equivalent to no-op depending on the game), while in the v1 versions the action set is reduced to just the minimal actions for each game. @@ -100,7 +102,9 @@ env.close_display() ``` or, if you're using the gym interface: ```python +import minatar import gymnasium as gym +minatar.register_envs() env = gym.make('MinAtar/Breakout-v1') env.game.display_state(50) # train, do steps, ... diff --git a/minatar/__init__.py b/minatar/__init__.py index e12a976..4505700 100644 --- a/minatar/__init__.py +++ b/minatar/__init__.py @@ -1 +1,2 @@ -from .environment import Environment \ No newline at end of file +from .environment import Environment +from .gym import register_envs \ No newline at end of file