Skip to content

jev-plays-pokemon

Pokémon Red agent on PyBoy where Jev reads a text snapshot of game state, answers parallel yes/no button questions and picks goals.

Projectprototype

Overview

jev-plays-pokemon is a small autonomous Pokémon Red agent built on TypeSafe's Jev and the PyBoy emulator. Jev has no vision and no conversation history, so every turn the harness builds a compact text snapshot: on-screen dialog decoded from tilemaps, a walkability map from RAM collision data, party, bag and battle state, nearby people and objects read from object memory, the room layout learned so far, short-term memory of recent actions, and a short-term objective.

Jev answers parallel yes/no questions such as whether pressing A or walking up is the best action, and picks a high-level goal each turn (talk to Mom, explore, leave the room, advance text), which code executes with A* pathfinding. Safeguards include flattened goal sampling so it never hard-locks, confidence and margin gating on menu and battle buttons, anti-pacing, stuck detection and exit probing. The README says it reliably plays the opening sequence end to end, through choosing a starter and stepping back into Pallet Town.

What the decision model decides

TypeQuestionAnswers
Yes / noIs pressing A the best action right now? (and similar per button)yes · no
ChoiceWhich high-level goal should the agent pursue this turn?talk to Mom · explore · leave the room · advance text

How it works

  1. Read RAM and tilemaps into a text snapshot with memory
  2. Ask Jev a goal choice and per-button yes/no questions
  3. Gate menu and battle buttons by confidence and margin
  4. Execute goals with A* pathfinding and safeguards
  5. Show a live SDL2 window

Strengths

  • Rich text state without vision
  • Harness supplies memory explicitly
  • Multiple safeguards against getting stuck

Caveats

  • Only the opening sequence is reliable so far
  • Requires your own ROM and a TypeSafe key

At a glance

Type
Project
Status
prototype
Language
Python
Runtime
PyBoy emulator
Has code
yes

Use cases and integrations

How curated lists describe it

  • Gaming: reads Pokémon Red game state as text, answers typed questions each turn, and lets deterministic code turn the answers into moves.

    yibie/awesome-jev

Frequently asked questions

Does Jev see the screen?

No. It gets a text snapshot built from RAM and tilemaps.

How does it remember past turns?

The harness keeps short-term memory and re-injects it into every snapshot.

How far does it get?

It reliably plays the opening, through choosing a starter.

Related projects

  • Source for browser chess and Chess960 where code computes each legal move's facts and Jev picks one per turn as a typed Choice.

    ProjectproductionTypeScript
  • Browser 1v1 sniper arena where Jev reads match state about 9 times a second and chooses movement, aim, ADS, firing and jumping.

    ServicebetaTypeScript
  • Instrumented 2048 web lab where every move is a Jev Choice over four directions, with probabilities, latency and cost shown live.

    ProjectbetaTypeScript
  • Fifteen live arcade games where Jev and LLMs play each other, led by WikiRace in which Jev picks only real links.

    ProjectbetaTypeScript
  • Real-time bot battles where you write a fighter's strategy in plain English and a System One model pilots it several times a second.

    ProjectbetaTypeScript
  • Browser extension that lets Jev, local Laya or an OpenAI-compatible model take over a running ra2web (WannaFire) RTS match.

    ProjectbetaTypeScript