Claude Opus 4.6 plays Pokemon FireRed 24/7 on a Mac Mini. It screenshots mGBA, reasons through every battle and menu, and presses the buttons itself — zero human input, never stops.
PokeLoop is Claude Opus 4.6 playing Pokemon FireRed from start to finish on a Mac Mini — completely autonomously. A Python agent running on the Mac Mini captures screenshots from mGBA at 480×320, sends them to Claude Opus 4.6 via the Anthropic API, and executes Claude's decisions as real keyboard inputs through pydirectinput. Every button press — every A, B, Start, D-pad direction — is Claude's call.
Playing Pokemon is deceptively complex for an AI. It requires reading dialogue, navigating tile-based maps, managing menus, making strategic battle decisions, and maintaining long-term goals across hours of gameplay — all from visual input alone.
Watch Claude Opus 4.6 think in real-time. Every 500ms the Mac Mini screenshots mGBA, sends it to Claude, and Claude responds with an observation, reasoning, action, and next plan.
The last 20 actions Claude took. Each entry is one decision cycle — Claude saw the screen, reasoned about it, and pressed a button.
Achievements unlocked as Claude progresses through Pokemon FireRed. Tracked via RAM reads on the Mac Mini — locked milestones show what's coming next.
Claude's active Pokemon team, read directly from FireRed's RAM in real-time via a Lua script running inside mGBA on the Mac Mini. Species, level, HP, moves — all pulled from memory addresses.
Defeat all 8 gym leaders to reach the Elite Four
The original 151 Kanto Pokemon. Pokemon Claude has caught or seen are highlighted with their type colors. Click any entry for full PokeAPI data.
Claude follows a 22-step progression tree through FireRed — from picking a starter in Pallet Town to challenging the Elite Four. Progress auto-updates when RAM confirms each milestone.
Every battle, step, and catch Claude makes is tracked. Stats are read directly from FireRed's RAM by the Lua script and fed to the live dashboard running on the Mac Mini.
Each session represents a continuous run of the AI agent from startup to shutdown.
The full pipeline running 24/7 on a single Mac Mini: mGBA emulator → Lua RAM reader → Python agent → Claude Opus 4.6 via Anthropic API → pydirectinput keyboard control.
Everything you need to know about PokeLoop.
500ms decision cycle: it captures the mGBA emulator frame, encodes it as a base64 JPEG, pairs it with structured game state extracted from RAM via a custom Lua script, and sends both to Claude Opus 4.6 through the Anthropic API. The model returns a JSON-structured decision — action, reasoning, and confidence — which the input handler executes via DirectInput scan codes. No human touches the keyboard. Ever.mss to grab the mGBA window at 480x320 resolution, compresses it to JPEG at quality 40 (keeping file size under 50KB), and base64-encodes it. This frame is merged with a structured context payload containing party HP/PP, opponent species and types, current map ID, badge count, inventory, and the active goal from the 22-step progression tree. The combined payload hits the Anthropic multimodal endpoint, and the model reasons over both visual and structured data simultaneously.PID % 24 determines the permutation of Growth, Attacks, EVs, and Misc blocks) and XOR decryption using the personality value. It extracts party data, opponent data, battle state flags, map coordinates, trainer name, badge bitmask, and Pokedex counts, then writes everything to game_state.json using an inline JSON encoder (mGBA has no JSON library).18x18 type effectiveness matrix and injects matchup data directly into the prompt. It tracks cursor position in the 2x2 move grid, calculates STAB bonuses, evaluates remaining PP across all four move slots, and monitors HP thresholds. When HP drops below 30%, an interrupt-driven healing system overrides the attack sequence — navigating the bag menu, selecting the right Potion, and executing a multi-tick input sequence. The system also maintains a list of nearby Pokemon Centers for strategic retreats.ChromaDB for semantic vector memory (the AI can recall past experiences by similarity search) and to PostgreSQL on Railway for the live dashboard feed. No Kubernetes, no Docker, no load balancers — one machine, one process, running indefinitely.5 seconds. Every stat, log entry, party member, and badge you see reflects the actual game state from the Mac Mini. The green "Online" indicator confirms the agent is actively running. When the system goes offline, the dashboard freezes on the last known state and switches to a red "Offline" indicator. Historical decision logs, catch events, and battle outcomes are all persisted and queryable.memory_reader.py alone is 999 lines containing all 386 species names and 354 move names for Gen III.