Skip to content

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.

ProjectproductionMIT (packages/jev), GPL-3.0 (packages/chess)

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

TypeQuestionAnswers
ChoiceWhich legal move should be played?legal moves with computed facts

How it works

  1. Compute every legal move's facts with chessops
  2. Send one Choice to Jev via the client
  3. Validate and play the move
  4. 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 typecheck

At 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.

    ServicebetaTypeScript
  • Instrumented 2048 web lab where every move is a Jev Choice over four directions, with probabilities, latency and cost shown live.

    ProjectbetaTypeScript
  • Fifteen live arcade games where Jev and LLMs play each other, led by WikiRace in which Jev picks only real links.

    ProjectbetaTypeScript
  • Real-time bot battles where you write a fighter's strategy in plain English and a System One model pilots it several times a second.

    ProjectbetaTypeScript
  • Browser extension that lets Jev, local Laya or an OpenAI-compatible model take over a running ra2web (WannaFire) RTS match.

    ProjectbetaTypeScript
  • One-page web app where Jev plays chess against OpenRouter LLMs, Stockfish or you, showing the moves it weighed and their probabilities.

    AppbetaJavaScript