Skip to main content

The Arcade Learning Environment (ALE) - a platform for AI research.

Project description

The Arcade Learning Environment Arcade Learning Environment

Python PyPI Version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

ale_py-0.9.1-cp312-cp312-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.12 Windows x86-64

ale_py-0.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ale_py-0.9.1-cp312-cp312-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ale_py-0.9.1-cp312-cp312-macosx_10_15_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ale_py-0.9.1-cp311-cp311-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.11 Windows x86-64

ale_py-0.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ale_py-0.9.1-cp311-cp311-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ale_py-0.9.1-cp311-cp311-macosx_10_15_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ale_py-0.9.1-cp310-cp310-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.10 Windows x86-64

ale_py-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ale_py-0.9.1-cp310-cp310-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

ale_py-0.9.1-cp310-cp310-macosx_10_15_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ale_py-0.9.1-cp39-cp39-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.9 Windows x86-64

ale_py-0.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ale_py-0.9.1-cp39-cp39-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

ale_py-0.9.1-cp39-cp39-macosx_10_15_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ale_py-0.9.1-cp38-cp38-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.8 Windows x86-64

ale_py-0.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ale_py-0.9.1-cp38-cp38-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

ale_py-0.9.1-cp38-cp38-macosx_10_15_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

Details for the file ale_py-0.9.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: ale_py-0.9.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for ale_py-0.9.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a16c62729d94bc4f250307545cfa7fb6d58c9bd397bb046b593eff8a821c1f46
MD5 d811f6ba36340cf8d51c8a8c59fbf43a
BLAKE2b-256 53bb470d53587b9dc2616a9d8401a05dda5892084a0adcf0bb34727f2131160f

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b50d7948dd51309d0391492b4683cc0c8c15c3656429d0f82b89f75c5380fcb
MD5 4b70c91856f4b75b425915560d4c4b8e
BLAKE2b-256 bd118e52603938caab5ff73dbb363d840bc7e1e8f9625de2aed77e4feca29fcd

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 59ff269beda52039f740b120bacf78b33359e7de9eddf0140416dd37e2e78a99
MD5 1221d5a69171da51096308237aea2827
BLAKE2b-256 bf017b258e27e2378b922a53ac3c32d2772d74bdede870c6b15cc1774f7001d8

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5aca4bbc854c71abcd0bce629677848908a7cdb57adabca14da83f687afdf9d1
MD5 ca0c2dd00cc4f69b06c5b2303254a862
BLAKE2b-256 f83eb30effe9142231c703eea1f8d26ce936195dee758f506cb1861cc236e1d9

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: ale_py-0.9.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for ale_py-0.9.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c06cd980ac66a4020efa7d8b47ba38b52b84e6247846d37722a5bd701a5a2a4d
MD5 97207cf93551d934af35da6f96f476b5
BLAKE2b-256 cd2c79219061d3bd0eef9e541fc45ca8404d933603065c92a11b55d3e2dfc158

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 28f3a80de612b12157a03d7052fe692572dab91779e9a4b314413a881e2f15e0
MD5 04cf41fda9a357e836a0de221ae28999
BLAKE2b-256 fddeea4e8ee857f78e73bf42cef609bf57a57684a8616cee64a49c9b923bcbc1

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d7c8960ae127aff04d636b58836d31790bb203db24c883247949e09739fb3b2c
MD5 b6c71da921893cf3396c46ac78916dc5
BLAKE2b-256 b07a5ed0a21b1f8e778432534b59dd5f96d805df0ad611dca4b3051353325cd1

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 9f99d785930ac836636829edd83f22b566db46d96474efb813eb2209994b3ad1
MD5 0feeb07271cb2bfd34dc066de2dfbba8
BLAKE2b-256 93a61a8512768479b4919bde06b07b6dc2c9ca258eb9723d89ccdfdc71f4266e

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: ale_py-0.9.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for ale_py-0.9.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e65a19f0803a50df3902f51223ad4f002c4ab3bd6b388173a7425f59f8952661
MD5 993609fe1e36c50f5f70322f1dbb7388
BLAKE2b-256 716ef30ef005a891ef8ad9c021258babdb78e9c6a17275dbae57827608b71de8

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d7917979864b0cdd00491a4e797bdce0cd1c63bb02a485602ebc464d06c9639
MD5 53e7bc25526e42ad63fe01043fa4ef8d
BLAKE2b-256 7efc6a31d25a6dc4177ae18199fcfab252188e8cdf12d673cdb59e0a63d0aa40

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7ff94c75b5922a264fdf217d9a177326b6d7ca176ebf84f65a86f0f15ac5f510
MD5 020b4a0b1283b58845aa744178add138
BLAKE2b-256 c2ddf58048c6a2c152b4b01299fafbeaa42e6d605e7795176bdd33ab0fef4907

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 205b0ef92f8d009df3f7ed59f982e18bc5af1f5c5914ff829117d6d764660952
MD5 1ce9e5694ea364b5f3af8e418aeb5248
BLAKE2b-256 2597ac6d670428e5903dc423cf70f9600220babd44e89cec89204aee30b2ce9b

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: ale_py-0.9.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for ale_py-0.9.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3c0d146220227affabd57113eb117c7fd6f56905ad0e669086b2f92bd93635dc
MD5 5982ce3941dea525dc85d716dcf747e7
BLAKE2b-256 939ec4129c83defee7b878886ecd8fa257c4d5a65ba4acf6d602f89e3f0757f4

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ba8bd3ddef451cf7a557935d2789c9eaf4bfbaf7332b30abe6dd63c62050727
MD5 04b0cf03075cb0d5cf4246217358ce52
BLAKE2b-256 f2a45743a039d684933b30769de78e12c9c93caa3e0017ab57f80b7c99c5846b

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c6c921900e57dc4efbce92df3c077768bbb6b63b9467a739a8b2941135cdb5a0
MD5 f03fba61e73ca7a85b83fcb7b3693cb4
BLAKE2b-256 9ec4eb9deb3eef7786285eb1be4173433f011201166fe4a2bd438ec298766ad9

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 435803b276207f30f0216af00b62bf6700f1d87c27cc9068212fe2cdd1bc3df1
MD5 ad9bf6b1a675b5a0e7265cca4d37817b
BLAKE2b-256 77bb36bfc788775e3c7c85fef649aa72f253115af7ba22c177b64dbe02018896

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: ale_py-0.9.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for ale_py-0.9.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0d79513d934808b506f0ed9fb44c7d84006188265c8e6e66e3f796e5d7245353
MD5 2a9d0bd9fe4022fc1e9495c166660850
BLAKE2b-256 cc2ad4aac33113c15b911f56e2890aa28701dfc8b7c6d78f8ca0be7e835e681b

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26634d5cdedfa1bd1331f1d6795914a183f3e1ad83fc5120758b01694d45a471
MD5 eb16659d572a2ab4d42aa7a6fc0f372f
BLAKE2b-256 5fc1ba5f4707d2548bf451c31af96abbd923e693a914eafd8a2b22ef078dd245

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9c35278c4798593de2fad3fcb3b8b0054900fab77ae0a1946b97637dbe82ca84
MD5 0fd065bd6a141a5de3d9a116c3f17280
BLAKE2b-256 80dd284f73855d49e046abcb872a61c3372099283e5174c683582e371057a1fa

See more details on using hashes here.

File details

Details for the file ale_py-0.9.1-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.9.1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 78eba7625cae2661f4a7cd3da8ccce570311646bafa3f054d56666d06da7959f
MD5 fa77d63363762bf28d2d88fb3bf8ba59
BLAKE2b-256 974d429570b29f7b70f52cb8b0fb54e5b42943690dd92a2d599684d34b476629

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page