jev-pokemon
Christian Mathiesen harness: Jev beats Pokemon Red from RAM legal options and facts, not scripts or memory writes.
Overview
jev-pokemon (github.com/christianmat/jev-pokemon, GPL-2.0-or-later) is Christian Mathiesen's Node harness where TypeSafe Jev plays Pokemon Red without scripts, cheats, or memory writes. The Game Boy emulator reads RAM, builds game state (map, party, battle, on-screen text), lists legal options with short facts (type matchups, damage estimates, progress hints), and Jev picks one Choice per step. A* pathfinding and menu mechanics run in code; Jev only judges. README documents a completed run: 37h 40m wall time, 16,150 decisions, about $1.65 total Jev cost, median about 0.4s per decision, 16 team wipes (14 at the Elite Four), and 15 Elite Four attempts. Landing page jev-pokemon.vercel.app hosts highlights; the Sep 25 to Sep 26, 2026 YouTube live stream has ended per README. Built at Frigade (frigade.com link in README).
Problem: Pokemon agents that let an LLM freestyle button prose burn money and still miss menu edge cases. You need legal options with facts, not open-ended play-by-play.
Built for: Researchers, streamers, and emulator hackers comparing RAM-first harness design on Pokemon Red, including anyone studying full-game cost and latency on TypeSafe Jev.
First indexed on Jev Directory: 2026-09-25
Creator and team
- Name
- Christian Mathiesen
- Organization
- Frigade
- Handle
- @christianmat
How Jev is used
- Role in the product flow
- Per-step Choice over legal emulator actions with fact-backed option lists
- Primitives
- Choice
- State in
- RAM-derived state: overworld and battle context, menus, dialog, party, milestones checked against real event flags (README How it works). Hidden items are omitted because a human would not know them.
- Decision out
- One legal button press or strategic focus (progress, heal, train, catch, shop, explore, team) per Jev call; harness applies inputs and loop protection when options repeat.
- Emulator advances frames and reads RAM
- Harness builds legal options plus facts, never writing game memory
- Jev selects one option via gateway or mock client
- Mechanics execute pathfinding, battles, and menus; logs land in jev-calls.jsonl
jev-pokemon is a finished Pokemon Red story, not a multi-game framework. Compared to thumay9700-jev-plays (PyBoy, modular tactics) or fhshaik-typesafe-mario (NES JSON state), this repo optimizes for one title with rich option lists and house rules: FAST text, battle animations off, player JEV, rival BLUE, and nickname spelling one letter at a time. Story goals live in src/knowledge/milestones.ts; progress is validated against in-game flags. Bring your own US/EU Pokemon Red ROM (SHA-1 documented in README), set AI_GATEWAY_API_KEY for real Jev, or use mock mode for free local dev. npm run setup builds pret/pokered symbol data; local viewer runs on port 8787. This is a fan experiment, not affiliated with Nintendo or TypeSafe AI per README Legal.
Sourced performance claims
- README Result table: 37h 40m total time, 16,150 decisions, about 39.2M input tokens, about $1.65 Jev cost, median about 0.4s per decision.Source: github.com/christianmat/jev-pokemon README Result
- README Cost section: about $1 to $1.70 per 24 hours at real-time speed; throttle worst case about $7 per day.Source: github.com/christianmat/jev-pokemon README Cost
- GitHub christianmat/jev-pokemon had 123 stars and 9 forks on 2026-10-08.Source: GitHub API stargazers_count and forks_count, 2026-10-08
Features and stack
Features
- Full-game completion documented with team levels and Elite Four retries
- jev-calls.jsonl audit log with options, probabilities, and latency
- Milestone checkpoints with resume and manual save tooling
- Loop protection for stuck menus and failing choices
- Static landing page in site/ with highlights video
Stack
- Node 20+
- Game Boy emulator (serverboy core)
- Vercel AI Gateway or mock Jev
Pricing: README cites $0.042 per million input tokens with free output; typical call about 1,200 tokens.
Links
FAQ
- How is this different from jev-plays?
- jev-plays is a Python PyBoy framework aimed at multiple retro titles. jev-pokemon is a TypeScript Pokemon Red completion harness with documented full-game metrics and a public landing page.
- Does the harness cheat or edit RAM?
- No. README states the harness only reads memory and presses buttons; it never writes game memory.
- Where is the stream?
- README says the Sep 25 to Sep 26, 2026 YouTube live stream ended; highlights are on jev-pokemon.vercel.app, which links to youtube.com/@frigadeapp.
Related learn guides
Original Jev guidance that pairs with this product pattern.
- Jev use cases
The patterns builders actually search for: moderation, routing, triage, RAG verify, and agent gates.
Related products
Hand-picked neighbors with rich profiles or overlapping tags.