Skip to content
Snippets Groups Projects
README.md 13.87 KiB

Gym Retro

Gym Retro is a wrapper for video game emulator cores using the Libretro API to turn them into Gym environments. It includes support for multiple classic game consoles and a dataset of different games. It runs on Linux, macOS and Windows with Python 3.5 and 3.6 support.

Each game 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.

Currently supported systems:

  • Atari 2600 (via Stella)
  • Sega Genesis/Mega Drive (via Genesis Plus GX)

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

Installation

Gym Retro requires Python 3.5 or 3.6. Please make sure to install the appropriate distribution for your OS beforehand. Please note that due to compatibility issues with some of the cores 32-bit operating systems are not supported.

Extra Prerequesites

Building Gym Retro requires at least either gcc 5 or clang 3.4.

Given that LuaJIT does not work properly on macOS you must first install Lua 5.1 from homebrew if running macOS:

brew install pkg-config lua@5.1

Install from binary

macOS

These wheels require macOS 10.11 or newer.

Python 3.5:

pip install https://storage.googleapis.com/gym-retro/builds/gym_retro-0.5.3-cp35-cp35m-macosx_10_6_x86_64.whl

Python 3.6:

pip install https://storage.googleapis.com/gym-retro/builds/gym_retro-0.5.3-cp36-cp36m-macosx_10_7_x86_64.whl

Linux