Building and Deploying a Pokemon-Playing LLM Agent at Anthropic
anthropic · Tech · 2023 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.4 (schema v2)
Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.
Problem
Domain: Long-horizon agent evaluation
Anthropic needed a playful but revealing way to test whether Claude could maintain coherent behavior over long horizons, learn from feedback, and use tools over thousands of game actions.
Constraints:
- The agent had to operate over hours of prompts and actions rather than a single-turn task.
- Pokemon progress is visible enough to act as an informal benchmark.
- The model needed persistent state because game knowledge and decisions accumulate over time.
- The project was an evaluation/learning experiment rather than a production user workflow.
Architecture
Claude Plays Pokemon gives the model a prompt, button-press tools, screenshots after actions, a self-managed knowledge base inside its context, and lightweight navigation/world information. The agent presses buttons, observes the resulting screen, updates memory, and continues over long sessions.
Diagram confidence: explicit (topology described by the source).
flowchart LR claude-agent[Claude Agent] --> button-tools[Button Tools] button-tools --> game-emulator[Game Emulator] game-emulator --> screenshot-observation[Screenshot Observation] screenshot-observation --> claude-agent[Claude Agent] claude-agent --> knowledge-base[Knowledge Base] navigation-helper[Navigation Helper] --> claude-agent[Claude Agent]
Components
| Component | Role | Interacts with |
|---|---|---|
Claude Agent |
LLM player making game decisions. | Button Tools, Knowledge Base, Game Emulator |
Button Tools |
Allowed controller actions such as A, B, start, select, and directions. | Game Emulator |
Game Emulator |
Pokemon environment that returns screen observations. | Claude Agent, Screenshot Observation |
Screenshot Observation |
Visual feedback after each action. | Claude Agent |
Knowledge Base |
Persistent in-context memory for game facts and navigation notes. | Claude Agent |
Navigation Helper |
Minor state/world information supporting movement. | Claude Agent |
Data flow
Claude receives the Pokemon-playing prompt, chooses button-press actions, gets a screenshot and small state dump after each action, writes persistent notes into a knowledge base, and repeats the loop as it navigates the game world.
Why this architecture
The architecture is intentionally simple because the experiment tests long-horizon tool use and memory rather than game-specific training. Button tools and screenshots create a closed action-observation loop, while the knowledge base gives Claude a way to persist useful discoveries over long sessions.
Models used: Claude · Claude Sonnet 3.5 · Claude Opus
Scale
- The project started around June of the prior year.“like the first time I tried this was in like June last year there's basically like two things that were true I was working I work with customers at anthropic I was working with a bunch of customers working on agents and like I wanted some place for”transcript, stated
- The evaluation stresses hours of prompts and actions.“over hours and hours and hours and prompts and prompts and prompts of like taking new information trying to learn update do stuff it became interesting enough for us to like understand what the models”transcript, stated
- The agent must track information over long periods of time.“that it stores to keep track of things over a long periods of time so it's like uh they electric is super effective against water the thing it could like decide to write there potentially but it like fully controls that so it can like”transcript, stated
Alternatives considered (roads not taken)
Use standard benchmark scores alone.
Rejected because: Pokemon exposed capability changes that were not obvious from similar benchmark scores.
Train specifically on Pokemon.
Rejected because: Part of the point was that the model was not trained on Pokemon.
Rely on prompt state alone.
Rejected because: The model needed a knowledge base to manage long-period information.
Patterns
tool-use-orchestration (game agent)
Claude controls the game through explicit button-press tools.
agent-memory (long-horizon state)
The knowledge base stores discoveries and navigation facts across long play sessions.
eval-driven-development (capability evaluation)
Pokemon is used as an unconventional benchmark for long-horizon coherence.
Tradeoffs
Evaluation task
Chose Pokemon gameplay over Only static benchmarks.
Rationale: The game gives visible long-horizon progress and failures.
Action space
Chose Button tools over Game-specific scripted actions.
Rationale: Button presses keep the interface generic and force the model to reason from observations.
Memory design
Chose Self-managed knowledge base over No persistent memory.
Rationale: Long gameplay requires recalling type advantages, locations, and prior discoveries.
Gotchas (what bit them)
Long-horizon agents bloat their own context.
Root cause: The summary and memory grow as the agent accumulates information.
Resolution: Use a knowledge base to externalize and organize long-running state.
Benchmarks can miss practical agent capability shifts.
Root cause: Traditional scores may look similar while embodied long-horizon behavior changes sharply.
Resolution: Use interactive tasks like Pokemon as complementary evals.
Evaluation
The project evaluates Claude by observing game progress, long-horizon coherence, prompt/action loops, knowledge-base use, and capability differences across model versions.
Metrics: Game progress · Long-horizon coherence · Prompt/action count · Knowledge retention · Model-version comparison
Outcomes
- The agent became a public demonstration of Claude playing Pokemon.
- The project surfaced long-horizon model improvements across versions.
- It provided an informal benchmark for agent memory and tool-use behavior.
The transcript emphasizes hours of play, prompts and prompts of actions, a June 2024 origin, and long-period knowledge retention rather than production traffic.