Skip to main content

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

Project description

The Arcade Learning Environment Arcade Learning Environment

Continuous Integration 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 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

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.

For more information on changes to the Atari environments in OpenAI Gym please check out the following blog post.

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.8.0-cp311-cp311-win_amd64.whl (950.7 kB view details)

Uploaded CPython 3.11 Windows x86-64

ale_py-0.8.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

ale_py-0.8.0-cp311-cp311-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ale_py-0.8.0-cp311-cp311-macosx_10_15_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ale_py-0.8.0-cp310-cp310-win_amd64.whl (950.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

ale_py-0.8.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

ale_py-0.8.0-cp310-cp310-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

ale_py-0.8.0-cp310-cp310-macosx_10_15_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ale_py-0.8.0-cp39-cp39-win_amd64.whl (950.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

ale_py-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ale_py-0.8.0-cp39-cp39-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

ale_py-0.8.0-cp39-cp39-macosx_10_15_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ale_py-0.8.0-cp38-cp38-win_amd64.whl (950.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

ale_py-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ale_py-0.8.0-cp38-cp38-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

ale_py-0.8.0-cp38-cp38-macosx_10_15_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

ale_py-0.8.0-cp37-cp37m-win_amd64.whl (951.0 kB view details)

Uploaded CPython 3.7m Windows x86-64

ale_py-0.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

ale_py-0.8.0-cp37-cp37m-macosx_10_15_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.7m macOS 10.15+ x86-64

File details

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

File metadata

  • Download URL: ale_py-0.8.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 950.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for ale_py-0.8.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e50c696e1386e38b0e07d6ed4515232e0e072ef5bbd6889952d165249691efde
MD5 c8cd511cd99abd733b7d287d10fb0dcf
BLAKE2b-256 8533f0eee22ef0a6cbb3139ea9a86a25fc95d6481d78a13d933b83fe2ec0634b

See more details on using hashes here.

File details

Details for the file ale_py-0.8.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.8.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 471a0a9e54a8b643f020c426d9530e1570bf4cfc62a753d9a6a06508e3348dbb
MD5 97ec4ec85567fa8696ee17cc2c9ab8aa
BLAKE2b-256 b05ff0b72aca34b8be1e759489ea7f55051ca88858cd7bb66d23be3f10e167a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ale_py-0.8.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e5ffd260e18757e9bb652d5180d3d53939700102e4d94a940e51720deaedea71
MD5 ad0e93e073f36881003a47bfa1b9dc98
BLAKE2b-256 b5d574db5b5eb0ad977768eb3069c3706c0399621b6e366a5c44a4835511b526

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ale_py-0.8.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 701067e1089fdc28a0a906437a433244a9f728d28d3ec469e9e98e026cecd382
MD5 8d7d75d155a2e1bee0aab47fd4fa3801
BLAKE2b-256 96fc2afa985809abf1bc2c0f715097354991ee6335a72b115bd9e0ac4d94d8b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ale_py-0.8.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 950.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for ale_py-0.8.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5040fbd174a853de572002c0c0dbecad304dcf6fd8bc3d21795e14dcae93fc48
MD5 34afd33c36ccdd0b8dd0502545bc61fc
BLAKE2b-256 9d3d672404ea8ecf88752ab158921c90c400c3227adccc1c5f9718c4208f1bb1

See more details on using hashes here.

File details

Details for the file ale_py-0.8.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.8.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 766ffcc59b5ec31d4fb0f95486caff08af35fe6076505c3a3c05872a407a49b5
MD5 6b2a34bf35b4553cb9d446c8efa5ba35
BLAKE2b-256 601b3adde7f44f79fcc50d0a00a0643255e48024c4c3977359747d149dc43500

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ale_py-0.8.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 252fcabd097223f82277a4afb204bc270057c712d48007dc0900a699403254b6
MD5 7616f9b64d30f5bd9efcd0fdf2df098c
BLAKE2b-256 377d4aec455930405207cd984934ac372c8e43b5deb5db163b6296e33153c9f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ale_py-0.8.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4bdc5dee2a8d7ff1df2b6f3cec491d041d1aac030228399b90f1687d3396e2eb
MD5 d7778392a9899c7fa0a4c29978ca7d2a
BLAKE2b-256 bdca9bf8f7cd094b8c9061caf8a30babc72d37c3c35f11d6afffe88154f5c1ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ale_py-0.8.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 950.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for ale_py-0.8.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cf295fafdf850b2c4e745345bae2b1509be43b0b01e608050d0036ff0554e529
MD5 357f37203212b199f4e712f867fc158b
BLAKE2b-256 1f12677ed7673456c2224e27f0f748f34c42bd297911b0e0debff088f40453dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ale_py-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 84dd3f8699e42df773df734d0be99bced949f7ddd06374ead356f666887fc6ad
MD5 94b294e3b46c305514d49a837dbbc66f
BLAKE2b-256 a0984316c1cedd9934f9a91b6e27a9be126043b4445594b40cfa391c8de2e5e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ale_py-0.8.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 60402333f744a9dec55aac09672b88ec9e34cd8bf82f2f4a79c1c4522a3a9a7e
MD5 a51076d1c2ad4c1acbc468529e4b57ca
BLAKE2b-256 77b38aa1d9645e16edc1f229c3f9a15270224145053a0e6193bc3d0732fa1585

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ale_py-0.8.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 a74c384f1bcc01b61accc92aa4fd26def5d03076a64500eecfd7d75a0e864955
MD5 b62cf77d77232b6fbd012cf6b352d94c
BLAKE2b-256 94f7744b39a7e363156ac8b46c88f2ff5bc50ae7aa19e66cd23d13966638b2ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ale_py-0.8.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 950.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for ale_py-0.8.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ff89a4fd824ca024c44e0985d8932884e28a8f7148139ff86d9aa8c53cb6bde2
MD5 f7a5cde0745a8901130c056aeeb7e332
BLAKE2b-256 0b3851c25f96e814d12deb39d8cb9bf9d70f368638a51f3b74b0f2ce6c7e0dd1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ale_py-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e55f5efc9eaafd7f8523da2f9a6749d9ebbbf1514cac66c281f8fb4ad8e8b40
MD5 18cd2cad3a58ae2f397e25c5e67f5657
BLAKE2b-256 0f8afeed20571a697588bc4bfef05d6a487429c84f31406a52f8af295a0346a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ale_py-0.8.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ee548db213cc99ea8b6f9a0e606e7a7cfe714493a7d821a99f8a3fc52f1f1f06
MD5 07d9f821521333e49b4c9e3fa4cfccb4
BLAKE2b-256 4869faf85e9762466a1693e631cb6f1f511d5591160a7f86880648c7040e4c56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ale_py-0.8.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5e1291a565a511d1ec1205c2d4011e0ced206a2fecb3d951a8c4e3d88f60ddb6
MD5 a8999dc41bd573b6a5133d7e5537c6c9
BLAKE2b-256 e527d1a6f7ca9d5211870964cf798da99bfb05767f9672364e361d8f9c35087a

See more details on using hashes here.

File details

Details for the file ale_py-0.8.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: ale_py-0.8.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 951.0 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for ale_py-0.8.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 0ffe4582de762a1cd57302ffd818ea3b7da6fde57882d575e8f10ad5e6bc82c3
MD5 4c8b788bd9152aa2c08f717cbb66fa8b
BLAKE2b-256 41c74f5daef0708eb940d1e4a50ff3709dbc274f248dba4cf994a3beea5aa077

See more details on using hashes here.

File details

Details for the file ale_py-0.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2ed721bea18a57aedc549c4e3708ff72e03cf48bc8324d885bbb22822a7bfd13
MD5 6f5f761f9cbf6c3a6ed9150bb3897093
BLAKE2b-256 abfd6615982d9460df7f476cad265af1378057eee9daaa8e0026de4cedbaffbd

See more details on using hashes here.

File details

Details for the file ale_py-0.8.0-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ale_py-0.8.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 9952eda389d70ad10d3eee12b37b6df854c52df85331a9c6a307bee7f26dd621
MD5 8cc4886d7affbfba536732bf4987e05d
BLAKE2b-256 d1c9cfc24ce195207b59513bfd244b4ddb741d239e9958a3991bf9bc62bb2f59

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