A chess engine written in Crystal, with a neural network evaluation.
Experion is a UCI engine with an NNUE evaluation trained from scratch on 142 million positions from CCRL games. It beats Fruit 2.1 and Crafty 25.2 in local matches, ships as a single self-contained executable, and runs in your browser.
Strength
Head-to-head matches with fastchess at 10+0.1, 100 games each, using the release binary as shipped.
| Opponent | Result | Score | Elo |
|---|---|---|---|
| Fruit 2.1 | 69–17–14 | 76% | +200 ± 74 |
| Crafty 25.2 | 58–32–10 | 63% | +92 ± 68 |
Experion ran on 4 threads; both opponents ran on one, at their default settings, and Crafty had its own clock through an XBoard bridge. Intervals are 95%. These are local head-to-head numbers, not rating-list ratings. The browser version runs on one thread, so it plays weaker than these figures.
How it works
Everything is written in Crystal, including the network inference. The training pipeline is Python and PyTorch.
NNUE evaluation
768 piece-square inputs across 8 mirrored king buckets feed 256 SCReLU units per side, with output buckets by piece count and a learned material lane. Accumulators update incrementally, and a per-bucket cache keeps king moves cheap.
Search
Iterative-deepening PVS with a transposition table, null-move pruning, late-move reductions, reverse futility, SEE-pruned quiescence, history heuristics and lazy SMP. Features that measured as losses were removed.
Trained from CCRL games
The extractor detects each game's score convention, deduplicates positions and keeps quiet ones. One consumer GPU trains the net in about half an hour. The full pipeline is in the repository.
Runs anywhere
Static Linux binary, macOS for Apple silicon and Intel, Windows, and a WebAssembly build for this site. The network is embedded, so there is nothing else to install.
Engine arena
The play page lets each side be a human or an engine, so you can play any of them or watch two play each other. Everything runs in your browser.
Experion
This engine, compiled to WebAssembly with its network.
Fruit 2.1
Fabien Letouzey's 2005 engine (GPL), compiled to WebAssembly from its original source.
CeruleanJS
Joey Robert's JavaScript engine (GPL-3.0), with its Polyglot opening book.
Your own engines
A small local bridge lets the page drive native engines on your computer, such as Crafty or the multi-threaded desktop Experion. Credits and sources.
Download
Prebuilt executables are attached to each release. Point any UCI chess GUI at the file.
Or build from source with shards build --release (Crystal 1.21 or newer).