Pokemon Red, but the trainer is a neural network
It wraps a Game Boy emulator in an RL environment so you can train agents to explore Kanto, then broadcast their stumbling journey to a live world map.

What it does The project hooks the PyBoy Game Boy emulator into Stable Baselines 3 to train reinforcement-learning agents on Pokemon Red. A newer V2 script trains faster and with less memory, swapping a frame-based KNN novelty reward for a coordinate-based exploration incentive that pushes the agent to discover new map locations—reportedly as far as Cerulean. You can also load a pretrained model and step in interactively, or stream training sessions to a shared global map viewer.
The interesting bit The coordinate-based reward in V2 is the kind of practical hack that keeps RL from getting lost in visual noise; rather than comparing raw frames, it rewards the agent for visiting new (x, y) coordinates. The live broadcast wrapper turns solitary training into a multiplayer spectator sport, plotting every agent’s progress on a shared world map.
Key highlights
- V2 replaces pixel-similarity exploration rewards with coordinate-based progress, cutting memory use and training time.
- Includes a pretrained interactive mode where you can override the agent with keyboard input.
- Streams training sessions to a shared global map via a
StreamWrapperintegration. - Ships with TensorBoard and optional Weights & Biases logging, plus static visualization tools.
- Has spawned follow-up work including an arXiv paper and the standalone
PokeGymenvironment.
Caveats
- Setup is path-sensitive: the ROM must sit in the root directory while scripts run from subdirectories, and macOS or AMD GPU users need separate dependency workarounds.
- The README touts V2 as faster and leaner but offers no hard benchmarks; it only confirms the agent reliably reaches Cerulean.
- Python 3.10+ is recommended, with other versions explicitly untested.
Verdict
Anyone curious about applied RL on classic games—or looking for a pre-built PyBoy wrapper with logging and broadcasting—should dig in. If you need a general-purpose Game Boy RL framework rather than a Pokemon-specific demo, check the spin-off PokeGym instead.
Frequently asked
- What is PWhiddy/PokemonRedExperiments?
- It wraps a Game Boy emulator in an RL environment so you can train agents to explore Kanto, then broadcast their stumbling journey to a live world map.
- Is PokemonRedExperiments open source?
- Yes — PWhiddy/PokemonRedExperiments is open source, released under the MIT license.
- What language is PokemonRedExperiments written in?
- PWhiddy/PokemonRedExperiments is primarily written in Jupyter Notebook.
- How popular is PokemonRedExperiments?
- PWhiddy/PokemonRedExperiments has 7.9k stars on GitHub.
- Where can I find PokemonRedExperiments?
- PWhiddy/PokemonRedExperiments is on GitHub at https://github.com/PWhiddy/PokemonRedExperiments.