#atari #rl #gym #learning #ml #api-bindings

atari-env

Atari Environment for Reinforcement Learning

2 releases

0.1.1 Apr 1, 2021
0.1.0 Mar 25, 2021

#390 in Simulation

23 downloads per month
Used in gyms

GPL-2.0-or-later

1.5MB
38K SLoC

C++ 21K SLoC // 0.3% comments Prolog 13K SLoC M4 2K SLoC // 0.0% comments C 1.5K SLoC // 0.2% comments Rust 454 SLoC // 0.0% comments Python 439 SLoC // 0.2% comments Shell 89 SLoC // 0.2% comments INI 24 SLoC // 0.1% comments Batch 8 SLoC

Gym-rs

A collection of RL envs and interfaces.

  • Does not bind to Python like other RL crates. You can run faster and parallel computations.
  • Provides an unified interface to various envs. Verify your algorithm on classic envs and apply to your domain without code change.

Example of running envs in separate threads without vectorized envs:

Crates Role
gyms main crate including all sub-crates
gym-core provides GymEnv, ContinuousEnv, DiscreteEnv, etc
atari-env ALE envs
openspiel-env (TODO) OpenSpiel envs
retro-env (TODO) libretro envs
deepmind-lab-env (TODO) DeepMind Lab envs

Unrelated crates: gym, gym-rs

Example

cargo run --example pong
cargo run --example pongpong
cargo run --example gym (requires the environmental variable `ATARI_ROMS_DIR`)
cargo run --example ppo (WIP)

Feature gates

Crates Default Available
gyms atari openspiel
gym-core
atari-env sdl
atari-env-sys
openspiel-env

Example: gyms = {version = "*", features = ["atari", "openspiel", "atari_env/sdl"]}

ROMs

The easiest way to obtain ALE-compatible ROMs is pip install atari-py. You will have ROM files in ~/.local/lib/python3.x/site-packages/atari_py/atari_roms/.

License

Crates License
gyms MIT
gym-core MIT
atari-env GPL v2
atari-env-sys GPL v2
openspiel-env MIT
retro-env MIT
deepmind-lab-env GPL v2

Dependencies

~27–46MB
~601K SLoC