stable-retro  by Farama-Foundation

Retro game environments for reinforcement learning

Created 2 years ago
290 stars

Top 90.8% on SourcePulse

GitHubView on GitHub
Project Summary

Stable-Retro provides a comprehensive suite of classic video games as Gymnasium environments for reinforcement learning research. It's a fork of gym-retro, actively maintained and expanded with new games, emulators, and platforms, making it ideal for RL practitioners seeking to train agents on a wide variety of retro gaming experiences.

How It Works

Stable-Retro leverages a modular architecture, integrating various emulator cores (e.g., FCEUmm for NES, Snes9x for SNES, Genesis Plus GX for Genesis) to render game states and process inputs. It extends the gym-retro framework by adding support for more systems and games, including arcade machines via fbneo, and provides tools for integrating custom ROMs and game states.

Quick Start & Requirements

  • Install via pip: pip3 install stable-retro or pip3 install git+https://github.com/Farama-Foundation/stable-retro.git
  • Dependencies: Python 3.7-3.12, CMake, wheel, pkg-config, lua@5.3, libzip, qt@5, capnp (for macOS builds).
  • ROMs are not included and must be obtained separately; a script python3 -m retro.import . is provided for importing them.
  • See official documentation: https://stable-retro.farama.org/

Highlighted Details

  • Supports a wide array of emulated systems including Atari, NES, SNES, Game Boy, Genesis, Saturn, and experimental arcade support (Neo Geo, CPS1/2/3).
  • Includes numerous game integrations beyond the original gym-retro, such as Super Mario Bros 2 Japan, Tetris (GameBoy), Virtua Fighter series, and Mortal Kombat series.
  • Offers PvP game support for training agents to compete against each other.
  • Provides tutorials for Windows WSL2 setup, game integration, and custom RetroArch integration.

Maintenance & Community

  • Actively developed and part of the Farama Foundation ecosystem.
  • Discord channel available for community support and development coordination: https://discord.gg/dXuBSg3B4D

Licensing & Compatibility

  • Licenses vary per emulator core; refer to LICENSES.md.
  • Generally compatible with commercial use, but ROM usage is subject to their respective licenses.

Limitations & Caveats

  • Game Boy (gambatte) emulator is not supported on Apple Silicon.
  • ROMs are not distributed with the package and must be sourced by the user.
Health Check
Last Commit

18 hours ago

Responsiveness

1 day

Pull Requests (30d)
5
Issues (30d)
0
Star History
11 stars in the last 30 days

Explore Similar Projects

Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Evan Hubinger Evan Hubinger(Head of Alignment Stress-Testing at Anthropic), and
3 more.

retro by openai

0.1%
4k
RL environment for classic video games
Created 7 years ago
Updated 1 year ago
Feedback? Help us improve.