AI-powered Pokรฉmon gameplay agent with headless emulation, REST API, and live dashboard.
Control Pokรฉmon games (Game Boy / GBA) programmatically via HTTP API, read live game state from emulator RAM, and watch the AI play through a real-time web dashboard.
- ๐น๏ธ Headless Emulation โ PyBoy (GB/GBC) and PyGBA (GBA) backends
- ๐ง Live Memory Reading โ Extract player data, party Pokรฉmon, battle state, bag items, map position, and story flags directly from RAM
- ๐ REST API + WebSocket โ Control the emulator via HTTP and receive real-time state updates
- ๐ Live Dashboard โ Beautiful cyberpunk-themed web UI with game screen, team stats, battle info, and AI action log
- ๐ A Pathfinding* โ Grid-based navigation with collision map support
- ๐พ Save States โ Named save/load slots for quick experimentation
- ๐ธ Screenshots โ Capture PNG frames on demand
# Basic install (PyBoy for GB/GBC)
pip install poke-player
# With GBA support
pip install "poke-player[pyboy,pygba]"
# With dashboard
pip install "poke-player[dashboard]"
# Everything
pip install "poke-player[all]"poke-player serve --rom path/to/red.gb --port 8765Open http://localhost:8765/dashboard in your browser.
# Start server
poke-player serve --rom red.gb --data-dir ~/.poke-player
# Show ROM info
poke-player info --rom red.gb
# Get current game state
poke-player state
# Press buttons
poke-player action a
poke-player action "up,up,a,b"
# Save / load state
poke-player save before_gym
poke-player load before_gym
poke-player saves
# Screenshot
poke-player screenshot --out frame.png
# Minimap
poke-player minimap
# Stop server
poke-player stop| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Server health check |
GET |
/state |
Full game state JSON |
GET |
/state/summary |
Human-readable state summary |
POST |
/action |
Press buttons ({"actions": ["a"]}) |
POST |
/save |
Save state ({"name": "slot1"}) |
POST |
/load |
Load state ({"name": "slot1"}) |
GET |
/saves |
List save slots |
GET |
/screenshot |
PNG screenshot (base64 or raw) |
GET |
/minimap |
Explored area minimap |
GET |
/info |
ROM metadata |
WS |
/ws |
WebSocket for live updates |
โโโโโโโโโโโโโโโ HTTP/WS โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Dashboard โ โโโโโโโโโโโโโโโโบ โ FastAPI โ โโโโบโ PyBoy โ
โ (Browser) โ โ Server โ โ / PyGBA โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Memory Reader โ
โ (Red/FireRed) โ
โโโโโโโโโโโโโโโโโโโโ
# Clone
git clone https://github.com/KevRojo/poke-player.git
cd poke-player
# Install in editable mode
pip install -e ".[all,dev]"
# Run tests
pytest
# Run with coverage
pytest --cov=poke_player
# Lint
ruff check .| Game | Platform | Status | Reader |
|---|---|---|---|
| Pokรฉmon Red/Blue | Game Boy | โ Complete | memory/red.py |
| Pokรฉmon FireRed | GBA | ๐ง Stub | memory/firered.py |
poke_player/
โโโ cli.py # Command-line interface
โโโ server.py # FastAPI HTTP/WebSocket server
โโโ emulator.py # Emulator wrapper (PyBoy / PyGBA)
โโโ pathfinding.py # A* tile navigation
โโโ memory/
โ โโโ reader.py # Abstract memory reader
โ โโโ red.py # Pokรฉmon Red/Blue reader
โ โโโ firered.py # FireRed reader (Phase 2)
โโโ state/
โ โโโ builder.py # Game state assembly
โโโ dashboard/
โโโ static/ # Web dashboard (HTML/CSS/JS)
Contributions welcome! Please open an issue or PR.
- Fork the repo
- Create a feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Open a Pull Request
MIT License โ see LICENSE for details.
- Memory addresses from pret/pokered
- Emulator backends: PyBoy, PyGBA
Made with ๐ by KevRojo