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 Gymnasium, a maintained fork of OpenAI Gym.
- Visualization tools.
- Atari roms are packaged within the pip package
Quick Start
The ALE currently supports three different interfaces: C++, Python, and Gymnasium.
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 installation may fail.
You can now import the ALE in your Python projects with providing a direct interface to Stella for interacting with games
from ale_py import ALEInterface, roms
ale = ALEInterface()
ale.loadROM(roms.get_rom_path("Breakout"))
ale.reset_game()
reward = ale.act(0) # noop
screen_obs = ale.getScreenRGB()
Gymnasium
For simplicity for installing ale-py with Gymnasium, pip install "gymnasium[atari]"
shall install all necessary modules and ROMs. See Gymnasium introductory page for description of the API to interface with the environment.
import gymnasium as gym
import ale_py
gym.register_envs(ale_py) # unnecessary but helpful for IDEs
env = gym.make('ALE/Breakout-v5', render_mode="human") # remove render_mode in training
obs, info = env.reset()
episode_over = False
while not episode_over:
action = policy(obs) # to implement - use `env.action_space.sample()` for a random policy
obs, reward, terminated, truncated, info = env.step(action)
episode_over = terminated or truncated
env.close()
For all the environments available and their description, see gymnasium atari page.
C++
The following instructions will assume you have a valid C++17 compiler and vcpkg
installed.
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 (i.e., display_screen
and sound
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 Distribution
Built Distributions
Hashes for ale_py-0.10.1-cp313-cp313-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f30d763c38063e5579783844868c1330f89049f252e94c49534785515f785f2 |
|
MD5 | 54cdc245537a5b6c2dd0b790ef216ae3 |
|
BLAKE2b-256 | fe6ad41757c995a856eb4ab29ae6c4fc7d0b8d21e719edc0bd10a5634bcb38e8 |
Hashes for ale_py-0.10.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92a31bd44687c6a3595fcdac35bc3238e305dd604171ba6a9cb7912bc83c99ee |
|
MD5 | 88a0aa3b4c09f234a715c9d72afd7c75 |
|
BLAKE2b-256 | b0a6f05688bed7fd7d64611a8c72225212dd971e32d39ac9e1c299bf3d4e85c2 |
Hashes for ale_py-0.10.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0835ee11004efeb5a9805a09c1525242f737257a8a4f5f4f0b9b3e047e6dca86 |
|
MD5 | a18824d6da4bed40deff52378ad90c9a |
|
BLAKE2b-256 | 95a0ced7cb40f44afe86f287e257aee8f09758bbc0e6b91c78f554a1d0963be7 |
Hashes for ale_py-0.10.1-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c43308af7013cb60c6f5e77cba2b9ccaed2f5e2ae444b365dce9b7ac3bb5d48f |
|
MD5 | 0f324553e03c1afcdb67532d8264a566 |
|
BLAKE2b-256 | b3b9deceed80853a22d7f81c989986f5771b174c129c1aa60acd94b3d7b3ff42 |
Hashes for ale_py-0.10.1-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0637ddc4074b814ae46db28d61aface08d7eba16ea713cdfe0734e0b18c3794 |
|
MD5 | d85e8f6de3d93562b52d6ecfa9de9cfb |
|
BLAKE2b-256 | 16eff71fcf7d202ad1546638f5535bd169e71cd143354efbdfe7ae22a767b5ca |
Hashes for ale_py-0.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d82d81715f15598b9db50529da971d36117cda027af9d112bd2ea22cefe3bcb |
|
MD5 | 0d94b8e6872ac86cf50b6d25ad749ff4 |
|
BLAKE2b-256 | 1a08d1fdfd9e8d0b0609d9ed047830a8c076a1aafc037213da36051a7ca47d54 |
Hashes for ale_py-0.10.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dd55a52e074497f1143785a215a50706afba3111be8b4923d46cc507c16be8f |
|
MD5 | 56ec742ac8ee5d5ba36411b0a6749953 |
|
BLAKE2b-256 | 3dcd75033786eacb9d495c5aeddc425394a9d37104afa2980152504fb594ee61 |
Hashes for ale_py-0.10.1-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24f7aa19e1b3b1540516942020a95f57964af71285497620e58f03b2c113424e |
|
MD5 | 62f4c54a02dbd1d41e682976e6dd565f |
|
BLAKE2b-256 | 20cb618e97c6fa9ca94c996bcc22299d6c0a0461a39a5d42755085c3d29d4f42 |
Hashes for ale_py-0.10.1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c77653e47d79e60abcc21bfad7dd105784ce2649fc5bc4eaaa1de45b40112772 |
|
MD5 | 39374691d2a7e32b2604d26b5c2fa712 |
|
BLAKE2b-256 | 55f09471eee05e95818fbbea1e3aca93d1eeeeabcc64f66f444bf36d9556846c |
Hashes for ale_py-0.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f0a3da4ff47f913b5c61e66571fe7fb92fc569e5babdf4b0eeee348aac1d457 |
|
MD5 | 5219a7c0dcb4a58c3f97a95f175bc16d |
|
BLAKE2b-256 | a6a1adcc29a2162364046de02c49e65310894c99fd623c1ca871ec1bff082e25 |
Hashes for ale_py-0.10.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b84025670cf37527348a417d7465ee193a19d0a336bcd62f943957c13fef6ebb |
|
MD5 | 90977874ad89a36c6bf9be4ae8781a98 |
|
BLAKE2b-256 | 7b2e93a0c1eeeafa4db76a2a7ae800ae69802365e0ba6300618a23b1791adb79 |
Hashes for ale_py-0.10.1-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 076a44a61c2518b844f765692a91d0a6b383c6592b5fdabd94fd24d4c62a54ef |
|
MD5 | 0ff44571d08ef1725513d4d32a194afe |
|
BLAKE2b-256 | 75a51b3fbfb73905b40f7418f5b12356d990d7f5c427d2f5dac53b2910a81c2b |
Hashes for ale_py-0.10.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fa3f3977f63b685394301432cba7fe417882cfea72424d75aaf6bf98f79a2c9 |
|
MD5 | 0ed9773a3849463b595ca535cb120ea2 |
|
BLAKE2b-256 | 9ef37a7dcc275d6000eec074aa71f6c11d1b4c0381f7d11400b10599c9c4403c |
Hashes for ale_py-0.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d4f326236c95736182323a480363c7b98959fc9a4ba09d2aa5b152faa6a2d59 |
|
MD5 | 8011dc12971af13f422d3207ca8b4831 |
|
BLAKE2b-256 | 2edd2abb024d5c39844846590e5c04eac0cd118b6c8c47bc7c268acb526c6580 |
Hashes for ale_py-0.10.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f3aaea36c1671812c21b5f7c5dcf9f5f9c726f5b10cbe7a657a844de963bb55 |
|
MD5 | e279df2f27d07438872739d43accf93c |
|
BLAKE2b-256 | edd32d7c9386032b205cb1de6f0ee852627e9b910b561b4f655879e3c4a768c2 |
Hashes for ale_py-0.10.1-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7733d521921452b9e644e9e31e4d5b1ba612305473c5ba0266cafb7eff6a5461 |
|
MD5 | e087ee01fa7104811e82debad0c9472f |
|
BLAKE2b-256 | 2908351ecf07b981905397c5c5e7e64035e2a3d2664723c9f987fd9fd107f960 |
Hashes for ale_py-0.10.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43d63b262f4b3bfcd567ce736a5648b4193470b2691bc14e38ac0c05dfe2a7e2 |
|
MD5 | b3591ea5229d225d3e1375bf07a10f84 |
|
BLAKE2b-256 | 74d1c2440245b377a7165610bd56d0f51a5e49000a7b5700d1e0f50bcf3fe430 |
Hashes for ale_py-0.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24b9e61a4e868a4266f8a0ef7809cc20cecedb8c10d515d14ff6078950d51d8b |
|
MD5 | da25503a29197893c4489cc83b911ab9 |
|
BLAKE2b-256 | 8db6883f4b87c49db9dabc7327e86679b8a29d2bf2b20cb57ab3e440e910c661 |
Hashes for ale_py-0.10.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6f91ab4b2a18e24c82a33fd1d616f32d121fcd6429f9045d515960df8cdc580 |
|
MD5 | 4c30dad41f59ee94d1692679ee049feb |
|
BLAKE2b-256 | 1f78c351f1f6cd97670fe25a96c7d08746b92b41201737f4ff4cc35866194eea |
Hashes for ale_py-0.10.1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3247ad68f7dda1f9c046ede74310e347114f2c191a9f4cd247f432410941eb9 |
|
MD5 | ac3d2cdb6c4a1cb67edc97ee450caf35 |
|
BLAKE2b-256 | 5fab6412519ca0181a3c1ae66889105784d52d323210f8f142fd224e1fecb34d |
Hashes for ale_py-0.10.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 771d5a1cd5a50d2cf226eba45c418fb7a18b453bd332b6a2189310030eda421a |
|
MD5 | 42fdf8d1d2aff61b0ff2657c16443c2b |
|
BLAKE2b-256 | 9fc4e57729ad180fcf380325fad451ff1578e800044421454d370d17349cc32f |
Hashes for ale_py-0.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12617edc9799c73570df67a731a4293bcfd500f413e0bfa867b53fc411fa7629 |
|
MD5 | 20ec69ee24de0ca3d810166a9b052e84 |
|
BLAKE2b-256 | 9e4a8398d145fb7c337a318c89e6f3ab05bfd99ab1f7116c54dd56f52a78b70f |
Hashes for ale_py-0.10.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82c676030b8b6543cb6969a905ff841ae6f086a2efe707542d014ef6ca4ada4e |
|
MD5 | 475a8766db8fd442472663c995210c13 |
|
BLAKE2b-256 | 4e873ecfcb046277bf3fcbb4b54aa9467cd8ad434418b2551eeef64eb34d2a85 |
Hashes for ale_py-0.10.1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9fac7fe11c56ed301a409d8a940f3e764ed2929b756ebb033eadf492a3d696e |
|
MD5 | 01148f4aeee249f39eb8c4b76ca925a9 |
|
BLAKE2b-256 | 9367b6178dbf9bb09dba5689f6445a0e67ba649c772f95b09d725cbf8fcc5d54 |