Package: ale-py
The Arcade Learning EnvironmentThe 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 emulatorStellaand separates the details of emulation from agent design.
Thisvideodepicts over 50 games currently supported in the ALE.For an overview of our goals for the ALE readThe 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 theCitingsection for BibTeX entries.FeaturesObject-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 throughpybind11.Native support for OpenAI Gym.Visualization tools.Quick StartThe ALE currently supports three different interfaces: C++, Python, and OpenAI Gym.PythonYou simply need to install theale-pypackage distributed via PyPI:pipinstallale-pyNote: Make sure you're using an up to date version ofpipor the install may fail.You can now import the ALE in your Python projects withfromale_pyimportALEInterfaceale=ALEInterface()ROM ManagementThe ALE doesn't distribute ROMs but we do provide a couple tools for managing your ROMs. First is the command line toolale-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-romsroms/[SUPPORTED]breakoutroms/breakout.bin[SUPPORTED]freewayroms/freeway.bin[NOTSUPPORTED]roms/custom.bin

Imported2/3ROMsFurthermore, Python packages can expose ROMs for discovery using the specialale-py.romsentry point. For more details check out the examplepython-rom-package.Once you've imported a supported ROM you can simply import the path from theale-py.romspackage and load the ROM in the ALE:fromale_py.romsimportBreakoutale.loadROM(Breakout)OpenAI GymGym support is included inale-py. Simply install  the Python package using the instructions above. You can also installgym[atari]which also installsale-pywith Gym.As of Gym v0.20 and onwards all Atari environments are provided viaale-py. We do recommend using the newv5environments in theALEnamespace:importgymenv=gym.make('ALE/Breakout-v5')Thev5environments follow the latest methodology set out inRevisiting the Arcade Learning Environment by Machado et al..The only major change difference from Gym'sAtariEnvis that we'd recommend not using theenv.render()method in favour of supplying therender_modekeyword argument during environment initialization. Thehumanrender mode will give you the advantage of: frame perfect rendering, audio support, and proper resolution scaling. For more information check outdocs/gym-interface.md.For more information on changes to the Atari environments in OpenAI Gym please check outthe following blog post.C++The following instructions will assume you have a valid C++17 compiler andvcpkginstalled.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 runmkdirbuild&&cdbuild
cmake../-DCMAKE_BUILD_TYPE=Release
cmake--build.--targetinstallThere are optional flags-DSDL_SUPPORT=ON/OFFto toggle SDL support (i.e.,display_screenandsoundsupport;OFFby default),-DBUILD_CPP_LIB=ON/OFFto build
theale-libC++ target (ONby default), and-DBUILD_PYTHON_LIB=ON/OFFto build the pybind11 wrapper (ONby default).Finally, you can link agaisnt the ALE in your own CMake project as followsfind_package(aleREQUIRED)target_link_libraries(YourTargetale::ale-lib)CitingIf 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 (flagrepeat_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}}