Gym Retro is an OpenAI project that transforms classic video games into reinforcement learning environments compatible with the Gym framework. The repository provides a comprehensive toolkit for researchers and developers to train machine learning agents on retro games, supporting approximately 1000 game integrations across multiple classic gaming platforms. The project is currently in maintenance status, with the team focusing on bug fixes and minor updates rather than major feature development.
The core functionality leverages the Libretro API, which enables support for various emulators across different gaming systems. The supported platforms include Atari 2600 via Stella, NEC TurboGrafx-16 and PC Engine via Mednafen, Nintendo systems including Game Boy, Game Boy Color, Game Boy Advance, NES, and SNES, and Sega systems including GameGear, Genesis, and Master System. This multi-emulator approach makes it relatively straightforward to add new emulators to the framework. The project runs on Windows 7, 8, and 10, macOS 10.13 and 10.14, and Linux systems, requiring a CPU with SSSE3 or better support. Python versions 3.6, 3.7, and 3.8 are supported.
Each game integration includes detailed metadata files that specify memory locations for in-game variables, custom reward functions derived from those variables, episode termination conditions, and savestates positioned at the beginning of levels. The repository also maintains files containing hashes of compatible ROMs, with most hashes sourced from No-Intro SHA-1 sums. Notably, ROMs are not included in the repository and users must obtain them independently, though the project includes several non-commercial ROMs for testing purposes, including demos and homebrew games from various platforms.
GitGenius activity tracking reveals that the repository operates with relatively long response latencies, with a median issue and pull request response time of approximately 51,617 hours and a mean of 36,655 hours across 11 tracked items. The most active contributors tracked include MatPoliquin with 2 events, followed by Caballo-loko and SpacePython12 with 1 event each. The repository shares overlapping contributors with several major projects including Microsoft's VSCode and TypeScript repositories as well as the Rust language repository, indicating cross-pollination with significant open-source ecosystems.
The project is written primarily in C, which provides the performance necessary for emulation and real-time game interaction. Documentation is available through a dedicated ReadTheDocs site, with a Getting Started Guide provided for new users. The repository includes comprehensive contribution guidelines and maintains a detailed changelog documenting project evolution. This infrastructure supports the project's role as a foundational tool for reinforcement learning research on retro games, enabling researchers to benchmark algorithms against a diverse set of classic gaming environments.