The Arcade Learning Environment (ALE) - a platform for AI research.
Project description
The Arcade Learning Environment
The Arcade Learning Environment (ALE) is a simple framework that allows researchers and hobbyists to develop AI agents for Atari 2600 games. It is built on top of the Atari 2600 emulator Stella and separates the details of emulation from agent design. This video depicts over 50 games currently supported in the ALE.
For an overview of our goals for the ALE read The Arcade Learning Environment: An Evaluation Platform for General Agents. If you use ALE in your research, we ask that you please cite this paper in reference to the environment. See the Citing section for BibTeX entries.
Features
- Object-oriented framework with support to add agents and games.
- Emulation core uncoupled from rendering and sound generation modules for fast emulation with minimal library dependencies.
- Automatic extraction of game score and end-of-game signal for more than 100 Atari 2600 games.
- Multi-platform code (compiled and tested under macOS, Windows, and several Linux distributions).
- Python bindings through pybind11.
- Native support for OpenAI Gym.
- Visualization tools.
Quick Start
The ALE currently supports three different interfaces: C++, Python, and OpenAI Gym.
Python
You simply need to install the ale-py
package distributed via PyPI:
pip install ale-py
Note: Make sure you're using an up to date version of pip
or the install may fail.
You can now import the ALE in your Python projects with
from ale_py import ALEInterface
ale = ALEInterface()
ROM Management
The ALE doesn't distribute ROMs but we do provide a couple tools for managing your ROMs. First is the command line tool ale-import-roms
. You can simply specify a directory as the first argument to this tool and we'll import all supported ROMs by the ALE.
ale-import-roms roms/
[SUPPORTED] breakout roms/breakout.bin
[SUPPORTED] freeway roms/freeway.bin
[NOT SUPPORTED] roms/custom.bin
Imported 2/3 ROMs
Furthermore, Python packages can expose ROMs for discovery using the special ale-py.roms
entry point. For more details check out the example python-rom-package.
Once you've imported a supported ROM you can simply import the path from the ale-py.roms
package and load the ROM in the ALE:
from ale_py.roms import Breakout
ale.loadROM(Breakout)
OpenAI Gym
Gym support is included in ale-py
. Simply install the Python package using the instructions above. You can also install gym[atari]
which also installs ale-py
with Gym.
As of Gym v0.20 and onwards all Atari environments are provided via ale-py
. We do recommend using the new v5
environments in the ALE
namespace:
import gym
import ale_py
env = gym.make('ALE/Breakout-v5')
The v5
environments follow the latest methodology set out in Revisiting the Arcade Learning Environment by Machado et al..
The only major change difference from Gym's AtariEnv
is that we'd recommend not using the env.render()
method in favour of supplying the render_mode
keyword argument during environment initialization. The human
render mode will give you the advantage of: frame perfect rendering, audio support, and proper resolution scaling. For more information check out docs/gym-interface.md.
C++
You must have a valid C++17 compiler and the following dependencies installed (we recommend using vcpkg
on all platforms)
vcpkg install zlib sdl2
Note: sdl
is optional but can be useful for display/audio support (i.e., display_screen
and sound
config options).
We use CMake as a first class citizen and you can use the ALE directly with any CMake project. To compile and install the ALE you can run
mkdir build && cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
cmake --build . --target install
There are optional flags -DSDL_SUPPORT=ON/OFF
to toggle SDL support (OFF
by default), -DBUILD_CPP_LIB=ON/OFF
to build
the ale-lib
C++ target (ON
by default), and -DBUILD_PYTHON_LIB=ON/OFF
to build the pybind11 wrapper (ON
by default).
Finally you can link agaisnt the ALE in your own CMake project as follows
find_package(ale REQUIRED)
target_link_libraries(YourTarget ale::ale-lib)
Citing
If you use the ALE in your research, we ask that you please cite the following.
M. G. Bellemare, Y. Naddaf, J. Veness and M. Bowling. The Arcade Learning Environment: An Evaluation Platform for General Agents, Journal of Artificial Intelligence Research, Volume 47, pages 253-279, 2013.
In BibTeX format:
@Article{bellemare13arcade,
author = {{Bellemare}, M.~G. and {Naddaf}, Y. and {Veness}, J. and {Bowling}, M.},
title = {The Arcade Learning Environment: An Evaluation Platform for General Agents},
journal = {Journal of Artificial Intelligence Research},
year = "2013",
month = "jun",
volume = "47",
pages = "253--279",
}
If you use the ALE with sticky actions (flag repeat_action_probability
), or if
you use the different game flavours (mode and difficulty switches), we ask you
that you also cite the following:
M. C. Machado, M. G. Bellemare, E. Talvitie, J. Veness, M. J. Hausknecht, M. Bowling. Revisiting the Arcade Learning Environment: Evaluation Protocols and Open Problems for General Agents, Journal of Artificial Intelligence Research, Volume 61, pages 523-562, 2018.
In BibTex format:
@Article{machado18arcade,
author = {Marlos C. Machado and Marc G. Bellemare and Erik Talvitie and Joel Veness and Matthew J. Hausknecht and Michael Bowling},
title = {Revisiting the Arcade Learning Environment: Evaluation Protocols and Open Problems for General Agents},
journal = {Journal of Artificial Intelligence Research},
volume = {61},
pages = {523--562},
year = {2018}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file ale_py-0.7-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: ale_py-0.7-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 926.5 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d398cb0733ca6a4f4b95d924a31d73b61c5db173cde7b2a09665f2c555893692 |
|
MD5 | aa4f63a6560cd342b31b94735bfd0113 |
|
BLAKE2b-256 | dceb41a5c90c9489d99699a3c0eb22581caaadedb7bd83c230f115e598357b33 |
File details
Details for the file ale_py-0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ale_py-0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a120fd98a843f1b6c6fe7f1415e6e5f2efef4fcc50a81bab5c732b9fc958f84f |
|
MD5 | 9b776e82839c25d53e52d3da63adf11a |
|
BLAKE2b-256 | ccaafe922ef4d43089c2339f20ce116762fe03b6060d79078155b123017f8788 |
File details
Details for the file ale_py-0.7-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: ale_py-0.7-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e4ddd74afd2fb61fcf0a519a4d80c703a7d00abc64ba1ee2c62bbdef7a349ef |
|
MD5 | e90319eac2a552308cd899a699d64db0 |
|
BLAKE2b-256 | 3896a61d9e7e6f7aa1b44c27578f9904589d4ab57a62ce8c2d2454c4ab599f2b |
File details
Details for the file ale_py-0.7-cp39-cp39-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: ale_py-0.7-cp39-cp39-macosx_10_15_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dd69275009e02dac05be685a325f7cb9b16d17400e9978527e8604e1f5e5a31 |
|
MD5 | 59e290827c51222bedbe6420f2133ae5 |
|
BLAKE2b-256 | 98b5e2f78bbe4d3499c482ee387b859d4da82048c0f9943e64e29cc52f309462 |
File details
Details for the file ale_py-0.7-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: ale_py-0.7-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 926.4 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e425bdfb1aa563a1e1a542460a00d34a11e02fb7e8c0e26aac4bf80b344d24af |
|
MD5 | 73583910d8daae966b243c4e76cf68cb |
|
BLAKE2b-256 | 275ac1181edd96a7f71086b2eac12756e85fafca8911f2fe26c83d891d335f85 |
File details
Details for the file ale_py-0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ale_py-0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55a9fcec7bb6f45da7350578e9c6642f3ea52f343f52f24452b53721fe8bd17d |
|
MD5 | 68c1812023eade19357550d35fdf3753 |
|
BLAKE2b-256 | 6f3d1cf94d7b5392e3e7ed02d9f7773bfa9334e725864270d7f5cfb3090ab5a1 |
File details
Details for the file ale_py-0.7-cp38-cp38-macosx_11_0_arm64.whl
.
File metadata
- Download URL: ale_py-0.7-cp38-cp38-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.8, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b67292f041f1bbeae2a8ae84dcb1e593022b9414537de0e280ce3c390c0478c6 |
|
MD5 | 892c02d000aba98bfcbbfda10e0ea7d5 |
|
BLAKE2b-256 | 50cda81b1deeb4bb6bf50286f9ecfea00a6a4786495ecf6c3db98d60451c15a8 |
File details
Details for the file ale_py-0.7-cp38-cp38-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: ale_py-0.7-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28b008ea09b05a1b279b17b65ed9b445c6e59420cc340644a42c97f68443123d |
|
MD5 | 9f2d438b2ad31cb01e6a45c1ed7d1a4f |
|
BLAKE2b-256 | b94bd825d06b378a0fef22cc120e0e31e30cebcfc73c45b61e7cda2a718cb591 |
File details
Details for the file ale_py-0.7-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: ale_py-0.7-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 926.8 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cbd48c266388510324c32342ba39617c5b163477fbbd23a89a22c0ff31005ef |
|
MD5 | d1122b6896f043464298415d0e82ef74 |
|
BLAKE2b-256 | 32b2116b0a44d4dbc21fd5b215d9bf6386daca0f5a4aed203ec44d1f734f6be7 |
File details
Details for the file ale_py-0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ale_py-0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecb983ae8e9103801c426a098952f07b76cd1d9b142eed4dc1b7cfbf57f7658a |
|
MD5 | 2692941618c8d3071ff1f2a62723b730 |
|
BLAKE2b-256 | 175b8b8b24adc029bf3c5e1d5313d9d8a0e3c14e3cbeab49b6b5afc33c466b58 |
File details
Details for the file ale_py-0.7-cp37-cp37m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: ale_py-0.7-cp37-cp37m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.7m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13d0108ca5f40ac2347f45c9af6c70bf3d4652b7854bedd003d989491e2f935f |
|
MD5 | 9eaa50cb5bacc0e2c128007ca7911590 |
|
BLAKE2b-256 | 1a4fe8c96edc32617ffbce1600028f7e42267e612c038cc21075cf88a784c1c4 |
File details
Details for the file ale_py-0.7-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: ale_py-0.7-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 926.7 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eac4b212f6387067f91247c11cfd75b7491801e5c66c373fc628f9cfa7837bd |
|
MD5 | c112ed1400757f4e61245077bf4e1cc0 |
|
BLAKE2b-256 | f302d00be6dc05ec97294fafdd03d1eb18ed8469cafacb0139d1507582853a2f |
File details
Details for the file ale_py-0.7-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ale_py-0.7-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.6m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0d6dc89e8232144959dc8ffe5fce4a7a30487ba69b64035afcf89ca8743261a |
|
MD5 | 960b8c3dbe9a2bdf1600576b675e3aa2 |
|
BLAKE2b-256 | d7e2cfc0a006c902dcbf1a326947cfe692329fbefad628d35103a46b7deab197 |
File details
Details for the file ale_py-0.7-cp36-cp36m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: ale_py-0.7-cp36-cp36m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.6m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39d4af211d1ac83312af2d4d60cb35d0ef3b60265c96cb6fc6d577fcb6ea193f |
|
MD5 | ab042f1fcb4e75960c744270d7b4ceae |
|
BLAKE2b-256 | 7f036865f6845535edf450393a927b9ef956db202dc98b8ab9dd54a44b9922f1 |