techlist.io

Game Emulation

1 posts

OpenAI2018-05-243 min readCurated summary

Gym Retro

# Gym Retro: A Platform for Generalization Research Across Games OpenAI is releasing the full version of Gym Retro, a reinforcement learning research platform that expands its public game library from roughly 100 titles to over 1,000 across several emulators. The release also includes the integration tool used to add new games. The authors argue that most RL research has focused on solving single tasks, and that a large, varied game collection makes it possible to study generalization between games that share concepts but differ in appearance. The post also shows that simple score-based rewards can lead agents to exploit games rather than complete them, and that current algorithms struggle with sparse rewards and long-horizon planning. ## Scope of the Release - The library grows from about 70 Atari and 30 Sega games to more than 1,000 titles. - Supported consoles include the Sega Genesis, Sega Master System, NES, SNES, and Game Boy, with preliminary support for the Game Gear, Game Boy Color, Game Boy Advance, and NEC TurboGrafx. - Some integrations in the `data/experimental` folder are in beta, and the authors ask for bug reports. - The new code lives on a branch and will not be merged until the ongoing Retro Contest ends, so contestants' code does not break. ## Motivation: From Single Tasks to Generalization - The Retro Contest and its technical report focus on generalizing across levels of one game (Sonic the Hedgehog). - The full dataset extends this to generalization across different games, which is a substantially harder problem. - The authors hope solutions developed by Retro Contest participants can scale to the full dataset. ## Integration Tool - Given a game's ROM, the tool creates save states, locates memory addresses, and defines scenarios that RL agents can solve. - It records and plays back movie files that store only the starting state and button inputs, not every frame. This keeps files small. - Movie files help visualize agent behavior and can store human demonstrations as training data. - An integrator's guide accompanies the tool for developers adding new games. ## Reward Farming - Agents often learn to maximize in-game score instead of completing the intended objective. In Cheese Cat-Astrophe and Blades of Vengeance, agents became trapped in loops that rapidly accumulated points. - Simple reward functions, such as maximizing score, can produce unintended behavior, a phenomenon the authors have discussed before. - Algorithms like PPO perform well on games with dense rewards, where points come frequently and difficulty lies mainly in reaction time. Gradius is an example, since points come from each enemy shot and dodging is handled frame by frame. - Existing algorithms struggle with sparse rewards or tasks that require planning several seconds ahead. Many games in the dataset fall into this category, so tackling the full dataset will likely require new techniques.