AutoPlay
A self-hosted console where a language model plays Game Boy games, and you can watch, inspect, and resume every run.
- Built with
- Python 3.11, PyBoy, FastAPI, WebSockets, SQLite
- Scale
- Tested across five games and more than 260,000 turns
How it works
AutoPlay connects a Game Boy emulator to a model through structured actions. Each turn it sends screenshots and selected game state, takes back an action in a fixed format, and plays it. Runs save screenshots, actions, and RAM snapshots to SQLite, so you can go back through earlier moves and resume later.
- Emulator
- Screen and RAM
- Model
- Action
Reading the game
Some games keep useful information in memory, but every game lays it out differently. AutoPlay has special RAM handling for first- and second-generation Pokémon, and for other games it can discover a memory schema and build up game-specific knowledge. That gives the model two views: what's on screen, and structured state when the system can read it reliably.
Saving model calls
Simple helpers handle known dialogue and animation screens, and the model only decides when the game needs a real choice. That cuts wasted calls, and it makes debugging clearer: did the model choose badly, or did it get a bad view of the game?