Skip to content

TypeSafe Chess — TholeG

Two Jev players playing chess with no engine: code owns the rules and the tactical facts, and the model returns one Choice per legal move with a probability for each, plus a Score for the position and a Noul for sharpness.

Stars
10
Language
JavaScript
License
MIT
Published by
Community
Author
TholeG
Last verified
Oct 2026

This is one of several Jev listings for the same project. The canonical entry is TypeSafe Chess — Dimesio.

About this project

Two virtual chess players, both powered by TypeSafe's System One model Jev. No engine, no generated text: each move is a typed decision that the model returns with a full probability distribution, and the code does the rest. Optionally, a Monte Carlo Tree Search uses those same distributions as policy and value, AlphaZero-style, to play noticeably better.

Quoted from the project's README. Read the full README.

Highlights

  • An illegal move is impossible by construction: chess.js generates the legal moves and each becomes one Choice option, so the model can only pick from them.
  • Optionally MCTS uses the same call as policy and value, PUCT over a tree where every node costs one API call and there are no random rollouts.
  • A Stockfish regret harness scores the fast move and the MCTS move on identical middlegame positions, reporting centipawn loss per move.
  • The UI shows visits, prior and Q for the top candidates and says whether the search confirmed or overruled Jev's first instinct.

Watch out

Cost is the first thing to check, because the two modes differ by an order of magnitude: a fast move is roughly 2-3k tokens and about 350 ms end to end, while an MCTS move with 16 evaluations runs around 40-50k tokens and 3 seconds, and a single MCTS game reaches about 2M tokens. Strength numbers carry a stated caveat - the elo ladder plays a lite WASM Stockfish at fixed depth, so the figures are relative rather than FIDE, and eight games give roughly plus or minus 200 Elo. On the measured side, the regret script scores the fast move and the MCTS move on identical positions and reports centipawn loss: the sweep table puts fast mode at 168-190 cp average loss and the best MCTS configuration at 25 cp, over two rounds of 20 tactical positions at oracle depth 12 with 16 evaluations. Worth knowing that the first MCTS version lost to the single-call player, because Jev's Score is an absolute judgment that calls every child position clearly better once one side is materially ahead, leaving the tree nothing to rank on; the fixes are code-side tactical facts. The README continues past the point this listing's source text ends, cut off inside the tuning-loop discussion. Copy reviewed against the repository README on 2026-10-04, not from running it.

Questions about this entry

Short answers drawn from the linked project or page.

More Jev resources like this

30GitHub stars
Side-by-side game harness where Laya running locally and Jev over API answer the same typed questions for snake, kombat, runner, flappy, tetris, and human-versus-model matches.
Jev Demos & Experiments#community#jevbest#catalog-import
21GitHub stars
Browser top-down driving sim that sends sensor JSON to Jev every 200ms with four typed driving questions in one call, then applies confidence gating and reflex rules to steer.
Jev Demos & Experiments#community#jevbest#catalog-import
12GitHub stars
Chrome extension that labels each X post with Substance, Humor, Chit-chat, Promo or Junk plus AI-written and off-topic flags, collapsing hidden posts to one line.
Jev Demos & Experiments#community#jevbest#catalog-import
11GitHub stars
Chrome extension that labels each X post with intent plus rage-bait, synthetic, and undisclosed-ad signals from Jev, with threshold-only rendering and local caching.
Jev Demos & Experiments#community#jevbest#catalog-import
3GitHub stars
Browser agent where Jev makes every navigation decision and agent-browser performs clicks and typing, stopping when the named goal page is reached or blocked.
Jev Demos & Experiments#community#jevbest#catalog-import
Local three-panel playground for trying TypeSafe judgments, with 110 editable examples across 22 categories including A/B comparisons, running one request per Run without bulk automation.
Jev Demos & Experiments#community#jevbest#catalog-import

From the Jev guides

Original write-ups on what this entry is for.

A game tick is a state plus a legal action list. How Clash Royale, Minecraft, and the earlier Mario, Pokémon, StarCraft, and drone loops ask Jev one step at a time.
Jev Demos & Experiments#gaming#agents#control
Read article
Back to all resources

From the Jev community

Posts from builders shipping with Jev right now.

Follow @typesafeai