Skip to main content

Python pre-commit Code style: black

A fork of gym-retro ('lets you turn classic video games into Gymnasium environments for reinforcement learning') with additional games, emulators and supported platforms. Since gym-retro is in maintenance now, you can instead submit PRs with new games or features here in stable-retro.

Emulated Systems

System Linux Windows Apple
Atari 2600 ✓ ✓ ✓
NES ✓ ✓ ✓
SNES ✓ ✓ ✓
Nintendo 64 ✓† ✓† —
Nintendo DS ✓ ✓ ✓
Gameboy/Color ✓ ✓ ✓
Gameboy Advance ✓ ✓ ✓
Sega Genesis ✓ ✓ ✓
Sega Master System ✓ ✓ ✓
Sega CD ✓ ✓ ✓
Sega 32X ✓ ✓ ✓
Sega Saturn ✓ ✓ ✓
Sega Dreamcast ✓‡ — —
PC Engine ✓ ✓ ✓
Arcade Machines ✓ ✓ —

† Built by default when BUILD_N64=ON and OpenGL headers are available. If headers are missing, the build skips the N64 core.

‡ Only available when hardware rendering is enabled (ENABLE_HW_RENDER=ON). Hardware rendering support is currently Linux-only in this project.

Supported Games

Currently over 1000 games are integrated including:

Category Games
Platformers Super Mario World, Sonic The Hedgehog 2, Mega Man 2, Castlevania IV
Fighters Mortal Kombat Trilogy, Street Fighter II, Fatal Fury, King of Fighters '98
Sports NHL94, NBA Jam, Baseball Stars
Puzzle Tetris, Columns
Shmups 1943, Thunder Force IV, Gradius III, R-Type
BeatEmUps Streets Of Rage, Double Dragon, TMNT 2: The Arcade Game, Golden Axe, Final Fight
Racing Super Hang On, F-Zero, OutRun
RPGs (experimental) Pokemon Red, Legend Of Zelda, Final Fantasy, Dragon Warrior

Note: If the game you want is not included but is supported by one of the systems in the list above, an integration tool is provided to help add new games.

Installation

Stable Retro supports Python 3.11 through 3.14.

pip3 install stable-retro

or if the above doesn't work for your platform:

pip3 install git+https://github.com/Farama-Foundation/stable-retro.git

If you plan to integrate new ROMs, states or emulator cores or plan to edit an existing env:

git clone https://github.com/Farama-Foundation/stable-retro.git
cd stable-retro
pip3 install -e .

For platform-specific instructions including building from source, optional core dependencies, and the Integration UI:

Example

'Nature CNN' model trained using PPO on Airstriker-Genesis env (rom already included in the repo)

sudo apt-get update
sudo apt-get install python3 python3-pip git zlib1g-dev libopenmpi-dev ffmpeg

You need to install a stable baselines 3 version that supports gymnasium

pip3 install git+https://github.com/Farama-Foundation/stable-retro.git
pip3 install stable_baselines3[extra]

Start training:

cd retro/examples
python3 ppo.py --game='Airstriker-Genesis-v0'

More advanced examples: https://github.com/MatPoliquin/stable-retro-scripts

Documentation & Tutorials

Documentation is available at https://stable-retro.farama.org/ (work in progress)

See LICENSES.md for information on the licenses of the individual cores.

Topic Description
Windows WSL2 Setup Step-by-step guide for setting up stable-retro on Windows 11 with WSL2 and Ubuntu 22.04
Game Integration Tool Playlist covering how to use the integration tool to add new games
RetroArch + ML Models Running a custom RetroArch build that supports overriding player input with trained models

ROMs and BIOS files

Each game integration has files listing memory locations for in-game variables, reward functions based on those variables, episode end conditions, savestates at the beginning of levels and a file containing hashes of ROMs that work with these files.

Please note that ROMs are not included and you must obtain them yourself. Most ROM hashes are sourced from their respective No-Intro SHA-1 sums.

Run this script in the roms folder you want to import. If the checksum matches it will import them in the related game folder in stable-retro.

python3 -m retro.import .

Some platforms like Sega Saturn and Dreamcast also need to be provided a BIOS. List of BIOS names and checksums.

The following non-commercial Sega Genesis ROM is included with Stable Retro for testing purposes:

List of other included ROMs.

Contributing & Support

See CONTRIBUTING.md

For any issues, suggestions, or discussions related to Stable-Retro, please use GitHub Issues or the Farama Foundation's Discord.

Supported specs:

Platforms:

  • Windows 10, 11 (via WSL2)
  • macOS 10.13 (High Sierra), 10.14 (Mojave)
  • Linux (manylinux1). Ubuntu 24.04 is recommended

CPU with SSE3 or better

Citation

@misc{stable-retro,
  author = {Poliquin, Mathieu},
  title = {Stable Retro, a maintained fork of OpenAI's gym-retro},
  year = {2026},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/Farama-Foundation/stable-retro}},
}

Papers

List of papers mentioning stable-retro. If you want your paper to be added here please open a github issue.

Metadata

Release files for stable-retro 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stable-retro 1.0.2
File Size Uploaded Provenance Actions
stable_retro-1.0.2.tar.gz 169.9 MB Without provenance Details for stable_retro-1.0.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for stable-retro 1.0.2
File Actions
stable_retro-1.0.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for stable_retro-1.0.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
stable_retro-1.0.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ ARM64, Linux glibc 2.28+ ARM64 Details for stable_retro-1.0.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
stable_retro-1.0.2-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for stable_retro-1.0.2-cp314-cp314-macosx_11_0_arm64.whl
stable_retro-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for stable_retro-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
stable_retro-1.0.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ ARM64, Linux glibc 2.28+ ARM64 Details for stable_retro-1.0.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
stable_retro-1.0.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for stable_retro-1.0.2-cp313-cp313-macosx_11_0_arm64.whl
stable_retro-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for stable_retro-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
stable_retro-1.0.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64, Linux glibc 2.27+ ARM64 Details for stable_retro-1.0.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
stable_retro-1.0.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for stable_retro-1.0.2-cp312-cp312-macosx_11_0_arm64.whl
stable_retro-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for stable_retro-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
stable_retro-1.0.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64, Linux glibc 2.27+ ARM64 Details for stable_retro-1.0.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
stable_retro-1.0.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for stable_retro-1.0.2-cp311-cp311-macosx_11_0_arm64.whl

Total release size: 1.6 GB

Release files / stable_retro-1.0.2.tar.gz

Download URL stable_retro-1.0.2.tar.gz
Size 169.9 MB
Tags Source
SHA-256 checksum
How to use checksums
9470a591173bd726e488935cf84e14671e66be8e8042f8b36a898290bdf5c467
BLAKE2b-256 checksum
How to use checksums
f31f77cdce888ee6d62ef36e104c5350143887695abbc02399059b2a151b6e8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stable_retro-1.0.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL stable_retro-1.0.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 140.2 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7eb5fc78d76d6113681b694558f869e7ac63e6cc8e5a2b80418da568f31725ac
BLAKE2b-256 checksum
How to use checksums
050c00e187cbeaca529d445ef676c34f32a98c83d89538eb90b2ff6edd96d67e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stable_retro-1.0.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL stable_retro-1.0.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 116.8 MB
Tags CPython 3.14 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
a030589817ba1fc8f3f616a9f8689f8f2dc22f539203f563ef2e469c10319a65
BLAKE2b-256 checksum
How to use checksums
fe068143197feeb4fdaed2439a3eb8aadb15bdd4a9d3842ddb561091530fdf8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stable_retro-1.0.2-cp314-cp314-macosx_11_0_arm64.whl

Download URL stable_retro-1.0.2-cp314-cp314-macosx_11_0_arm64.whl
Size 105.6 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e145c5d0730a47c8c0e28d7d97316619cea0a5523fbc0fb820a15e154a581db5
BLAKE2b-256 checksum
How to use checksums
982ec39ab887ac7882f143814b69e648ed211db5b5a6c19d49de07a0fd122e2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stable_retro-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL stable_retro-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 140.2 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0740ec1e0586cb0072252cc06b791b09291acb0823d4127d453f5474a85c8287
BLAKE2b-256 checksum
How to use checksums
0eb8f7b341904dfb1ea086606ce87bfc9f4f59141208b910b11962d9777da55a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stable_retro-1.0.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL stable_retro-1.0.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 116.8 MB
Tags CPython 3.13 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
353d47ca1f268a453639e0472f5cbd781b163fa79d3aabddc6941f1545d51ca2
BLAKE2b-256 checksum
How to use checksums
71b05507c8ece6405e1ac1d82fff26b3220e6ce65f0a41a740af05024242df78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stable_retro-1.0.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL stable_retro-1.0.2-cp313-cp313-macosx_11_0_arm64.whl
Size 105.6 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
83fcc226442d4fe9c39a31a48fdf69f5bd8511fd931156a14c41317bad32d684
BLAKE2b-256 checksum
How to use checksums
5efb380b43f8c5aeec768205d96d7e07746bfc3ac900b417da8e0a99206a26a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stable_retro-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL stable_retro-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 140.2 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e0f622e0e9c9c9d6328301b9edffa94a96ee54d547dac5d12d37e7ea62ccbcdb
BLAKE2b-256 checksum
How to use checksums
9fac6a4bcd57ef429a08a55d7965a17fb6881a8e48fce8e59515d894e665b932
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stable_retro-1.0.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL stable_retro-1.0.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 116.8 MB
Tags CPython 3.12 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
6e7c210d1e28b6ae3dd6dd22e9a85a4a62600516045d025fa0286c5e76170844
BLAKE2b-256 checksum
How to use checksums
da30984d4fe2db46f3d9b6e8f3983c6a4a15569d026fa17c8b3fefd13773fd43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stable_retro-1.0.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL stable_retro-1.0.2-cp312-cp312-macosx_11_0_arm64.whl
Size 105.6 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7627bc64780c2607f4495cf03065a572c1e9333ea4f82c5ce5d5f4efbc1ed332
BLAKE2b-256 checksum
How to use checksums
f9b12fb4c4e51839cc21c996a289dbe8800c4b5acb1185eabe8a88c97f485d86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stable_retro-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL stable_retro-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 140.2 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1a49a8a11b0b5c85a13c079cf037cfe662e4dd78bc3a4f010f25af4604fbdb5c
BLAKE2b-256 checksum
How to use checksums
76f63d6a697084c4777d8609318a43996662291b34f5306a27b3c320043f34cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stable_retro-1.0.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL stable_retro-1.0.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 116.8 MB
Tags CPython 3.11 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
6ebcd4bb13343b6eab82b6e109ff96e0a6eb968583e4b9a0bfe18c55533174e2
BLAKE2b-256 checksum
How to use checksums
0be1693a725411ed9554ede34e9d72cd056813d9b6181dc45f1b34a8a374caad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stable_retro-1.0.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL stable_retro-1.0.2-cp311-cp311-macosx_11_0_arm64.whl
Size 105.6 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6a5c1621592a064ffd595f67e34d426a1a98deeb9fe2f8b319663a261365840a
BLAKE2b-256 checksum
How to use checksums
d60550783f0932cc05fc7fc792250f6cd37845da30e44eeb502c26b5b74d1594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for stable-retro 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page