Jev plays Pokémon
Pokémon Red, played one typed turn at a time.
# jev-plays-pokemon — TypeSafe Jev plays Pokémon Red
[](LICENSE)
[](pyproject.toml)
[](README.md#known-limitations)
A small autonomous Pokémon Red agent. It uses [TypeSafe's System One model, Jev](https://docs.typesafe.ai/introduction): Jev reads the game state as **text**, answers typed questions each turn, and deterministic code turns those answers into button presses on a [PyBoy](https://github.com/Baekalfen/PyBoy) Game Boy emulator.
**Jev has no vision.** It can't see the screen or write text. Instead, every turn we build a compact text snapshot of the game: the on-screen dialog, a walkability map read from RAM, your party/bag/battle state, the room layout learned so far, and a short-term objective. Jev answers *parallel yes/no questions* ("is pressing A the best action right now?", "is walking UP best?") and the code picks the strongest, safest button press.
**Jev has no conversation history.** Unlike an LLM in a chatbot, Jev doesn't get a growing transcript of past turns — each turn is a fresh, self-contained request. Whatever Jev needs to know about the past has to be *in* that request, so the harness itself does the remembering: it keeps a short-term memory (recent dialog pages, recent high-level actions, the explored fraction of the current room) and re-injects it into every snapshot. Jev decides only from what it sees in the current turn; continuity comes from the harness, not the model.
## What it can do
- Plays through the intro automatically (title → NEW GAME → names RED → names the rival), fast-forwarded.
- Reads Pokémon Red's RAM directly: location, facing, money, badges, party (species/level/HP/status/types/moves), bag, battle state, and story flags.
- Decodes the on-screen dialog box / menu text from the emulator's tilemaps (e.g. `FIGHT PKMN BAG R