What the source published
On September 25, Christian Mathiesen of Frigade published Jev Plays Pokémon Red: he wired Jev, TypeSafe AI's decision model, into a Node-based Game Boy emulator and let it play the original Pokémon Red all the way into the Hall of Fame. The landing page carries the full run data: 37 hours 40 minutes of total playtime, 16,150 decisions, roughly 39.2 million input tokens, a total model bill of about $1.65, and a median decision time of 0.4 seconds. The final team: Charizard 83, Graveler 62, Nidoqueen 45, Beedrill 44, Haunter 39 and Primeape 29 — with 16 team wipes along the way, 14 of them at the Elite Four, which took 15 attempts to beat.
There are no scripts and no cheats. The harness only reads the game's memory; it never writes to it. For each decision it enumerates the legal options and attaches facts about them — A* pathfinding for movement, type matchups and damage estimates for battles — and Jev picks one. The model decides every menu answer (naming, starter choice, YES/NO, shopping, healing, learning or forgetting moves), what to focus on (progress, heal, train, catch, shop, explore, team), which Pokémon to catch and which to swap in or out at the PC, where to go and whom to talk to, and every single battle action (move, switch, item, ball, run). Its game knowledge is deliberately limited to the story milestones — the next goal and where it happens, kept in src/knowledge/milestones.ts — and progress is verified against the game's real event flags. Hidden items are not shown to it, because a human player wouldn't know where they are either.
The house rules keep it fair: text speed FAST and battle animations OFF, set once in the options at boot. The player is named JEV and the rival BLUE. Every caught Pokémon gets a nickname, and Jev has to spell it letter by letter (A–Z or DONE), inventing a made-up name rather than reusing a species name or an existing nickname — commenters asked whether the nicknaming experiments were tried before it was switched off, and the author confirmed the spelling mechanic survived into the final run. When the bot gets stuck, the harness first tags already-tried options and tells Jev to try something new, then samples an alternative, and as a last resort reloads the latest milestone checkpoint. The whole live run streamed on YouTube from September 25 to 26 and has since ended; the highlights reel stays on the landing page. The repository is GPL-2.0, ships with no ROM, and the author states plainly that you must bring your own legally obtained US/EU Pokémon Red dump (SHA-1 ea9bcae617fdf159b045185467ae58b2e4a48b9a), because the harness reads RAM addresses straight from the pret/pokered disassembly of that exact build. The site is not affiliated with Nintendo, Game Freak or The Pokémon Company.
Try it: run your own Jev Boy
- Open jev-pokemon.vercel.app first: watch the highlights reel and read the run stats (total time, decisions, token cost) so you know what a finished run looks like.
- Read the How it works section of the GitHub README before touching code — the whole trick is the split between a memory-reading harness and the decision model, not a bigger model.
- Prepare the environment: macOS or Linux, Node 20+, and git. Then: git clone https://github.com/christianmat/jev-pokemon && cd jev-pokemon && npm install.
- Install the build tooling with npm run setup: this installs rgbds (via brew), clones and builds the pret/pokered disassembly, and generates the symbol data the harness uses to read RAM.
- Supply your own legally dumped US/EU Pokémon Red ROM as roms/red.gb and verify its SHA-1 matches ea9bcae617fdf159b045185467ae58b2e4a48b9a — the harness only works with that exact build.
- Copy .env.example to .env. Start with JEV_MODE=mock (the default), a free dumb stand-in that lets you verify the whole loop works; when you are ready for the real Jev, set JEV_MODE to the gateway and fill in AI_GATEWAY_API_KEY (the Vercel AI Gateway key).
- Launch with npm start -- --speed 1 and open http://localhost:8787 to watch the live viewer; use --resume to continue from the latest milestone checkpoint, --load <save-name> for a specific save, or npm run headless -- --steps 3000 for max-speed log-only runs.
- Study the logs like a coach: logs/jev-calls.jsonl records every single model call — full game state, the legal options with their facts, the probabilities, and latency — and logs/events.jsonl records maps, milestones, saves and errors.
Sources: [1]
The full picture: a dumb model, a fat harness, and 37 hours of patience
The cost figure is the first thing that stops you scrolling: $1.65 to beat a 40-hour RPG. Jev is priced at $0.042 per million input tokens with output free, and the average decision costs about 1,200 tokens — so a full day of play at real-time speed runs $1 to $1.70. The project is an existence proof that long-horizon agent runs don't need a frontier model if the harness does the heavy lifting.
That trade-off is exactly what the HN thread debated. The top skeptical comment — "with such a fat harness, this is more like watching a walkthrough play the game" — is answered by the architecture: the harness only enumerates options and facts; every choice, including the bad ones that caused 16 team wipes, belongs to the model. The 15 Elite Four attempts are the model's own learning curve, not a script's. Loop protection (tag tried options, sample alternatives, reload checkpoint) is what keeps a 0.4-second decision loop from spinning for 37 hours.

Note the author's real motive, stated on the landing page: "JEV only knew where to go next because it had a guide. Your users need one too!" Frigade builds AI assistants that learn your product and show each user the next step inside the app — the Pokémon run is a demo of guided decision-making as a product philosophy, milestones.ts as product onboarding.
For reproducibility-minded readers, the strongest part is the logging: every one of the 16,150 decisions is on record with state, options, probabilities and latency. You can replay the entire run analytically without spending a dollar.
How to read this
Read it as a case study in harness-first agent design, not as a leaderboard. The lesson is that a modest decision model plus exhaustive, legible options can finish a genuinely long-horizon task — the median 0.4s decision time means Jev was never the bottleneck; the game's own pacing was. Compare it with the earlier "AI plays games" wave (Claude Plays Pokémon, Gemini Plays Pokémon): those were big models; this one is a cheap specialist plus a fat harness, and the cost/performance point is the story.
The honest caveat from the thread stands: the milestones file is hand-authored knowledge of the story's next goal, so Jev isn't discovering the quest — it's executing it. That's a fair boundary to keep in mind before declaring "an AI beat Pokémon." What it did beat was the execution: menus, battles, routing, recovery from wipes, and 37 hours without human steering.
Key takeaways
- Jev, TypeSafe AI's decision model, beat Pokémon Red end-to-end: 37h 40m, 16,150 decisions, ~39.2M input tokens, ~$1.65 total.
- Architecture: a Node Game Boy emulator + harness that only reads memory and lists legal options with facts (A*, type matchups, damage estimates); the model makes every choice; nothing is written to game memory.
- Game knowledge is limited to hand-authored story milestones; progress is checked against real event flags, and hidden items stay hidden from the model.
- Anti-stuck design: tried options get tagged, then alternative sampling, then a milestone-checkpoint reload as the last resort.
- The run cost about $1–1.70 per 24 hours at Jev's $0.042/M input tokens (output free) — a proof that long-horizon agents can be cheap if the harness is good.
- You can reproduce it: macOS/Linux + Node 20, clone the repo, npm run setup (rgbds + pret/pokered), drop in your own legally dumped US/EU ROM (no ROM is distributed), and start in free mock mode before plugging in a real API key.

