Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<game-id>')
````
```
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.
Expand All @@ -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, ...
Expand Down
3 changes: 2 additions & 1 deletion minatar/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .environment import Environment
from .environment import Environment
from .gym import register_envs