Chess with Jev
Source for browser chess and Chess960 where code computes each legal move's facts and Jev picks one per turn as a typed Choice.
Overview
This repository is the code behind Chess with Jev on chriswijnia.com: browser chess and Chess960 where code works out every legal move's facts and Jev picks one per turn as a single typed Choice over the legal moves.
It has two packages. packages/jev is a small MIT-licensed Jev client that tries Vercel AI Gateway first and TypeSafe directly as fallback, checks answers and reports cost. packages/chess (GPL-3.0, built on chessops) computes move facts, makes Jev's move decision, generates Chess960 positions and scores finished games. Unit tests run without Jev calls. The repository is a mirror of the site's monorepo, so pull requests are applied upstream.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which legal move should be played? | legal moves with computed facts |
How it works
- Compute every legal move's facts with chessops
- Send one Choice to Jev via the client
- Validate and play the move
- Score finished games
Strengths
- Reusable Jev client with fallback and cost reporting
- Unit tests without API calls
Caveats
- Mirror repository; contributions go upstream
- Chess package is GPL-3.0
Getting started
npm install && npm test && npm run typecheckAt a glance
- Type
- Project
- Status
- production
- Language
- TypeScript
- Runtime
- browser + Node
- Has code
- yes
- Has tests
- yes
- License
- MIT (packages/jev), GPL-3.0 (packages/chess)
Use cases and integrations
How curated lists describe it
Chess and Chess960 in the browser where code works out each legal move's facts and Jev picks one per turn as a single Choice, with its candidates drawn as arrows.
hellogumbo/awesome-jev
Frequently asked questions
What does Jev decide?
One move per turn from the legal moves.
Can I reuse the client?
Yes, packages/jev is MIT-licensed.
Can I send pull requests?
They are read but applied in the upstream monorepo.
Related projects
Browser 1v1 sniper arena where Jev reads match state about 9 times a second and chooses movement, aim, ADS, firing and jumping.
ServicebetaTypeScriptInstrumented 2048 web lab where every move is a Jev Choice over four directions, with probabilities, latency and cost shown live.
ProjectbetaTypeScriptFifteen live arcade games where Jev and LLMs play each other, led by WikiRace in which Jev picks only real links.
ProjectbetaTypeScriptReal-time bot battles where you write a fighter's strategy in plain English and a System One model pilots it several times a second.
ProjectbetaTypeScriptBrowser extension that lets Jev, local Laya or an OpenAI-compatible model take over a running ra2web (WannaFire) RTS match.
ProjectbetaTypeScriptOne-page web app where Jev plays chess against OpenRouter LLMs, Stockfish or you, showing the moves it weighed and their probabilities.
AppbetaJavaScript