About this project

Stable Retro is a community-maintained fork of OpenAI's gym-retro, which turns classic video games into Gymnasium environments for reinforcement learning. Since the original project is in maintenance mode, new games and features are accepted here instead. Emulated systems The project bundles multiple emulator cores and documents platform support for Linux, Windows and Apple. Covered systems include Atari 2600, NES, SNES, Nintendo 64, Nintendo DS, Game Boy/Color, Game Boy Advance, Sega Genesis, Master System, Sega CD, 32X, Saturn, Dreamcast, PC Engine and arcade machines. Some cores have caveats: Nintendo 64 requires BUILD_N64=ON and OpenGL headers; Sega Dreamcast requires hardware rendering (ENABLE_HW_RENDER=ON), currently Linux-only; Gambatte (Game Boy) is skipped by default on Apple Silicon arm64. Games and environments Over 1000 games are integrated across categories such as platformers (Super Mario World, Sonic 2, Mega Man 2, Castlevania IV), fighters (Mortal Kombat Trilogy, Street Fighter II, Fatal Fury, King of Fighters '98), sports, puzzle, shmups, beat-em-ups, racing and experimental RPGs. Each integration includes memory locations for in-game variables, reward functions, episode end conditions, level-start savestates and ROM hashes. ROMs and some BIOS files are not included and must be obtained by the user; a retro.import command checks hashes and imports matching ROMs. A non-commercial Sega Genesis ROM, Airstriker, is bundled for testing. Installation and usage Stable Retro supports Python 3.10 through 3.14 and can be installed from PyPI or directly from the Git repository. Editable installs are recommended when integrating new ROMs, states or emulator cores. Platform-specific documentation covers Linux (Ubuntu/Debian, WSL2, N64 and Dreamcast core setup) and macOS (Apple Silicon, Homebrew). An example trains a Nature CNN with PPO on the Airstriker-Genesis environment using Stable Baselines3, and more advanced scripts are linked externally. Tooling and documentation An integration tool helps add new games, with a video playlist explaining its use. Documentation is hosted at stable-retro.farama.org and is described as work in progress. Tutorials cover Windows 11 with WSL2 and running a custom RetroArch build that lets trained models override player input. Supported specs list Windows 10/11 via WSL2, macOS 10.13/10.14, Linux (manylinux1, Ubuntu 24.04 recommended) and CPUs with SSE3 or better. Community and research Contributions are directed through CONTRIBUTING.md, GitHub Issues and the Farama Foundation Discord. The README lists several academic papers that mention stable-retro, spanning reinforcement-learning environments, generative world models, LLM agent benchmarks and game AI research.