danijar / dreamerv2

Mastering Atari with Discrete World Models
https://danijar.com/dreamerv2
MIT License
898 stars 195 forks source link

How to run dreamerv2 on atari games #24

Closed KimiakiShirahama closed 2 years ago

KimiakiShirahama commented 3 years ago

We could successfully run dreamerv2 on the Minigrid environment by referring to the README.md. And, we are now trying to run dreamerv2 on atari games, but the environment loaded from an atari game, especially SpaceInvaders-v0, seems to be not compatible with the agent's input. Could you tell us the way to run dreamerv2 on SpaceInvaders-v0? Or, should we modify some codes like agent.py and envs.py, so that the agent and environment are compatible with each other.

danijar commented 2 years ago

Atari is already implemented in the code base. Just don't use it via the Gym interface but directly with the Atari configs. As in the README eg:

python3 dreamerv2/train.py --logdir ~/logdir/atari_pong/dreamerv2/1 \
  --configs atari --task atari_pong

Hope that helps.