nes-py  by Kautenja

NES emulator and OpenAI Gym interface

Created 7 years ago
266 stars

Top 96.2% on SourcePulse

GitHubView on GitHub
Project Summary

nes-py is a Python 3 NES emulator and OpenAI Gym interface for macOS, Linux, and Windows, built upon the SimpleNES emulator. It allows users to interact with classic Nintendo Entertainment System games programmatically, making it suitable for researchers and developers interested in reinforcement learning or game emulation.

How It Works

The emulator is based on the SimpleNES core, providing a functional NES environment. It integrates with OpenAI Gym, enabling the creation of custom reinforcement learning environments from NES games. This allows agents to be trained to play these games, leveraging the emulator's state and action space.

Quick Start & Requirements

  • Primary install: pip install nes-py
  • Debian: Requires clang++ compiler (sudo apt-get install clang).
  • Windows: Requires Visual Studio 2017 (17.0) tools.
  • Usage: nes_py -r <path_to_rom>
  • Documentation: nes_py -h
  • Development: Instructions available on the Wiki.

Highlighted Details

  • Supports NROM, MMC1/SxROM, UxROM, and CNROM mappers.
  • Keyboard controls map directly to NES joypad inputs (W=Up, A=Left, S=Down, D=Right, O=A, P=B).
  • Threading: Rendering is not supported from threading.Thread instances.
  • Multiprocessing: Rendering is supported from multiprocessing.Process instances, provided nes-py is imported within the process.

Maintenance & Community

No specific contributors, sponsorships, or community links (Discord/Slack) are mentioned in the README.

Licensing & Compatibility

The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project is provided for educational purposes only and is not affiliated with or approved by Nintendo. Rendering is not supported in threaded environments.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 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.