Skip to main content

Arcade Learning Environment Python Interface

Project description

Build Status

The Arcade Learning Environment

Overview

The Arcade Learning Environment (ALE) is a simple object-oriented 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 (BibTeX entry at the end of this document). Also, if you have any questions or comments about the ALE, please contact us through our mailing list.

Feedback and suggestions are welcome and may be addressed to any active member of the ALE team.

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 50 Atari 2600 games.
  • Multi-platform code (compiled and tested under OS X and several Linux distributions, with Cygwin support).
  • Communication between agents and emulation core can be accomplished through pipes, allowing for cross-language development (sample Java code included).
  • Python development is supported through ctypes.
  • Agents programmed in C++ have access to all features in the ALE.
  • Visualization tools.

Quick start

Install main dependences:

sudo apt-get install libsdl1.2-dev libsdl-gfx1.2-dev libsdl-image1.2-dev cmake

Compilation:

$ mkdir build && cd build
$ cmake -DUSE_SDL=ON -DUSE_RLGLUE=OFF -DBUILD_EXAMPLES=ON ..
$ make -j 4

To install the Python module:

$ pip install .

or

$ pip install --user .

Getting the ALE to work on Visual Studio requires a bit of extra wrangling. You may wish to use IslandMan93's Visual Studio port of the ALE.

For more details and installation instructions, see the manual. To ask questions and discuss, please join the ALE-users group.

ALE releases

Releases before v.0.5 are available for download in our previous website. For the latest releases, please check our releases page.

List of command-line parameters

Execute ./ale -help for more details; alternatively, see documentation available at http://www.arcadelearningenvironment.org.

-random_seed [n] -- sets the random seed; defaults to the current time

-game_controller [fifo|fifo_named] -- specifies how agents interact
  with the ALE; see Java agent documentation for details

-config [file] -- specifies a configuration file, from which additional 
  parameters are read

-run_length_encoding [false|true] -- determine whether run-length encoding is
  used to send data over pipes; irrelevant when an internal agent is 
  being used

-max_num_frames_per_episode [n] -- sets the maximum number of frames per
  episode. Once this number is reached, a new episode will start. Currently
  implemented for all agents when using pipes (fifo/fifo_named) 

-max_num_frames [n] -- sets the maximum number of frames (independent of how 
  many episodes are played)

Citing The Arcade Learning Environment

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}
}

Contributing, code style

If you would like to make changes to the codebase, please adhere to the following code style conventions.

ALE contains two sets of source files: Files .hxx and .cxx are part of the Stella emulator code. Files .hpp and .cpp are original ALE code. The Stella files are not subject to our conventions, please retain their local style.

The ALE code style conventions are roughly summarised as "clang-format with the following settings: ReflowComments: false, PointerAlignment: Left, KeepEmptyLinesAtTheStartOfBlocks: false, IndentCaseLabels: true, AccessModifierOffset: -1". That is:

  • Indent by two spaces; Egyptian braces, no extraneous newlines at the margins of blocks and between top-level declarations.
  • Pointer/ref qualifiers go on the left (e.g. void* p).
  • Class member access modifiers are indented by one space.
  • Inline comments should be separated from code by two spaces (though this is not currently applied consistently).
  • There is no strict line length limit, but keep it reasonable.
  • Namespace close braces and #endifs should have comments.

The overall format should look reasonably "compact" without being crowded. Use blank lines generously within blocks and long comments to create visual cues for the segmentation of ideas.

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.6.0.dev20200207-cp38-cp38-win_amd64.whl (381.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

ale_py-0.6.0.dev20200207-cp38-cp38-manylinux2010_x86_64.whl (709.7 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

ale_py-0.6.0.dev20200207-cp38-cp38-macosx_10_15_x86_64.whl (403.2 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

ale_py-0.6.0.dev20200207-cp37-cp37m-win_amd64.whl (381.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

ale_py-0.6.0.dev20200207-cp37-cp37m-manylinux2010_x86_64.whl (709.7 kB view details)

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

ale_py-0.6.0.dev20200207-cp37-cp37m-macosx_10_15_x86_64.whl (403.3 kB view details)

Uploaded CPython 3.7m macOS 10.15+ x86-64

ale_py-0.6.0.dev20200207-cp36-cp36m-win_amd64.whl (381.6 kB view details)

Uploaded CPython 3.6m Windows x86-64

ale_py-0.6.0.dev20200207-cp36-cp36m-manylinux2010_x86_64.whl (709.7 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

ale_py-0.6.0.dev20200207-cp36-cp36m-macosx_10_15_x86_64.whl (403.3 kB view details)

Uploaded CPython 3.6m macOS 10.15+ x86-64

ale_py-0.6.0.dev20200207-cp35-cp35m-win_amd64.whl (381.6 kB view details)

Uploaded CPython 3.5m Windows x86-64

ale_py-0.6.0.dev20200207-cp35-cp35m-manylinux2010_x86_64.whl (709.7 kB view details)

Uploaded CPython 3.5m manylinux: glibc 2.12+ x86-64

ale_py-0.6.0.dev20200207-cp35-cp35m-macosx_10_9_x86_64.whl (403.7 kB view details)

Uploaded CPython 3.5m macOS 10.9+ x86-64

File details

Details for the file ale_py-0.6.0.dev20200207-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: ale_py-0.6.0.dev20200207-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 381.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ale_py-0.6.0.dev20200207-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4a34e8c9a25b50a60599c9a126ca93b33b725bc518fa329b815df59e4269c800
MD5 8b4d3613181115d07a6e1bb74600c9a9
BLAKE2b-256 8e1cd8060ca730f1dcdf4606aba0878772508c7866d5b89e4c9321ec31cfd2ae

See more details on using hashes here.

File details

Details for the file ale_py-0.6.0.dev20200207-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ale_py-0.6.0.dev20200207-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 709.7 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ale_py-0.6.0.dev20200207-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 2113f2a7a2b6ff4d5c62174d70e8881cfac7c6939c9dc4eaf8a20cd584ec9578
MD5 2b2fa7c005a8af591018611322f32925
BLAKE2b-256 aa59198b3b3118884d03966b4d2153a1b830ae3b3acc5d658b32519f8b837d26

See more details on using hashes here.

File details

Details for the file ale_py-0.6.0.dev20200207-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: ale_py-0.6.0.dev20200207-cp38-cp38-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 403.2 kB
  • Tags: CPython 3.8, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ale_py-0.6.0.dev20200207-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 ef8e15957f6b374d0a36b2e435ba9b668db5d95a8a54cb8666f72505dec973d1
MD5 4dcad1661a01806896b8b7fa006b7dee
BLAKE2b-256 c7c9a1d2798dfe3486bc448ffce5cc15da9af51d4966e2c19dc3553063c16bfe

See more details on using hashes here.

File details

Details for the file ale_py-0.6.0.dev20200207-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: ale_py-0.6.0.dev20200207-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 381.6 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ale_py-0.6.0.dev20200207-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 787099c96eee0f44ca83762fd83514d9817c253e39df0c0bcbca87c5ff2d4d08
MD5 5cccf1e288fa7e512fa40f5101a909f8
BLAKE2b-256 28940608a975778fd21ad41d7c20b296456155a85192d7959df030dae502fe05

See more details on using hashes here.

File details

Details for the file ale_py-0.6.0.dev20200207-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ale_py-0.6.0.dev20200207-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 709.7 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ale_py-0.6.0.dev20200207-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 cb0d5bee20bb9a169af5dfb7380a618db024168da03824a91555c9c2e37d93b4
MD5 386ce0e9db6abd9f6ac0a311da6028f7
BLAKE2b-256 6522762c71ae6aab65d8a662d89b1bf681a5baaec52e233c452f57d763e4efec

See more details on using hashes here.

File details

Details for the file ale_py-0.6.0.dev20200207-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: ale_py-0.6.0.dev20200207-cp37-cp37m-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 403.3 kB
  • Tags: CPython 3.7m, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ale_py-0.6.0.dev20200207-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 28a915b16f13fdeefc4e870b9ffb0e251b3ad550dfb24ad39c0ac3af67419d33
MD5 e9ff9535aa5a26b0d6e071dbc5136692
BLAKE2b-256 3d5d8b8e5142963f6eb20fc93cee82f41fc06696ea7a756b9334656543c2787d

See more details on using hashes here.

File details

Details for the file ale_py-0.6.0.dev20200207-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: ale_py-0.6.0.dev20200207-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 381.6 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ale_py-0.6.0.dev20200207-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 748fb339b28f6f57890cbb9acfe964c810b23802910310cb5796bd96bdf361d4
MD5 02d99a427dbe4316d01ec42cb955c1ca
BLAKE2b-256 d440efac7621b114e3fc9dc329e1f78b484d576c8203a3357c42e524feb33ebc

See more details on using hashes here.

File details

Details for the file ale_py-0.6.0.dev20200207-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ale_py-0.6.0.dev20200207-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 709.7 kB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ale_py-0.6.0.dev20200207-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 bd34a4af59c94fc8d667dbeec915d48fb9cb41264105782f70ec581242c59b2b
MD5 113d0d8360a617114fdac7bb52b39cef
BLAKE2b-256 691db47f39e5dffc994bc6d3ab5688aed91a990b7f039046f0cdf666985cb189

See more details on using hashes here.

File details

Details for the file ale_py-0.6.0.dev20200207-cp36-cp36m-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: ale_py-0.6.0.dev20200207-cp36-cp36m-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 403.3 kB
  • Tags: CPython 3.6m, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ale_py-0.6.0.dev20200207-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 df81297cd3e07770c4945d685dcb55d2c05b9bae808a47c56c52e253a21df5c8
MD5 73f3becd7a437db38c93b9801c26058e
BLAKE2b-256 3d8bc21a518d7ac3fd1bb0fcb7d9a655578fc2dc81a10c7bec52d722ba1d0b0f

See more details on using hashes here.

File details

Details for the file ale_py-0.6.0.dev20200207-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: ale_py-0.6.0.dev20200207-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 381.6 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ale_py-0.6.0.dev20200207-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 0946398df60d99fe65d9f5e210735b621bc8c8cad313ce072695f55739908cdc
MD5 f2a01de8bb9b46896c8be0ce756a6be4
BLAKE2b-256 29813f958c43dff83d2003af3a1c66dcd2fdf89634bf20be4bcfa56b09a5e6f5

See more details on using hashes here.

File details

Details for the file ale_py-0.6.0.dev20200207-cp35-cp35m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ale_py-0.6.0.dev20200207-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 709.7 kB
  • Tags: CPython 3.5m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ale_py-0.6.0.dev20200207-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3024c19ecceef18121e94544a26b3495c6a94e4d84b04c5115a4bfef5f6474a6
MD5 14ceb42275085a9b59cf03391086c449
BLAKE2b-256 67affca118bf9ff3f44cdc39c316b8d3338a399eda4109230aa9433bb2844010

See more details on using hashes here.

File details

Details for the file ale_py-0.6.0.dev20200207-cp35-cp35m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: ale_py-0.6.0.dev20200207-cp35-cp35m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 403.7 kB
  • Tags: CPython 3.5m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ale_py-0.6.0.dev20200207-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d9fbe0ef9f9bc4a8b64b4743dddc3c8293996f3bf9e4ded3c14bfdcbe7acc107
MD5 2d7be9be0517a823f202846f5a3a268c
BLAKE2b-256 e2f75d8933da11fc47a90801b03299a4141094e22c90db9d0fc89057fcc98163

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