shipwithjev

Catalog / Games & real time

0340GitHub

jev-plays-pokemon-red

Pokemon Red on PyBoy where deterministic code owns the route and arithmetic and Jev picks only at branches, with every battle turn's faint prediction scored by Brier against the…

valentynkit/jev-plays-pokemon-redREADME ↗
# jev-plays-pokemon-red

Pokemon Red played by a model that only outputs probabilities. Code reads the Game Boy's
memory into a typed snapshot and hands the model a menu of the moves that are actually
legal; it returns a probability for each one. The bars are those probabilities.

    uv run jpp play --rom /path/to/your/red.gb --overlay



That is a real cartridge under PyBoy, not a mockup. The agent walks out of the bedroom,
crosses Pallet Town, takes Charmander from Oak, and wins the rival battle without anyone
touching a key.

## The numbers, and what is still blank

Measured over the calls that were answered on a cartridge, through the Vercel AI Gateway
shim rather than the direct API:

```
479  496  563  679  867  1470 ms      median 621, mean 759 (n=6)
about 1.3 decisions/sec, $0.14/hour at ~725 input tokens a call
```

Calibration is **not** published yet, on purpose. The endpoint's free tier serves about
five calls per window, so the longest labelled run so far is n=5 turns with a confidence
interval that covers everything, including the constant predictor. A Brier score on that
sample would be decoration. `uv run measure` prints whatever the run actually supports, a
bad number included, and says when there is nothing to say.

## Why

Claude Plays Pokemon is a large model deliberating tens of seconds a move. This answers a
closed-set question in under a second, so the emulator is the bottleneck instead of the
model.

The catch, up front: it cannot plan. It never sees more than the current decision. Every
route, threshold and piece of arithmetic is ordinary Python, and the model only picks among
actions the code already proved legal. It is also not asked often. Code handles the routine
ticks and only calls Jev where the game actually branches. Between the bedroom

Also filed under Games & real time

  1. 0607

    2048Jev: Jev plays 2048

    Built a demonstration of Jev playing 2048. Note: It might not always win. :)

    @TheRealRajdeep · Games & real time

  2. 0603

    System 1 Speedcuber: a Rubik's cube agent

    A speedcubing agent built on Jev and Laya ModernBERT-421M, with real-time 3D state, temporal memory and calibrated move probabilities instead of a solver.

    @harsha_varma02 · Games & real time

  3. 0597

    Astra and Jev play Minecraft

    A video letting Astra plan and Jev act inside Minecraft, with an outcome the creator didn't expect.

    @MatinSenPai · Games & real time

  4. 0593

    Jev Kitchen

    Inspired by @heystefan_: name a dish or a cocktail, and its ingredients rise out of a pile of stickers. ⚡ Jev judges every search in half a second 🎨 ~1,000 illustrations by FLUX.1 [dev], run locally through ComfyUI 🧠 Claude Opus 5.5 built it all and redrew the illustrations

    @nelsonpklark · Games & real time