Chess engine · C++17 · Neural network · Live on Lichess
I built KavinEngine from scratch at 18: the rules of chess, a search that weighs millions of positions a second, and a neural network that judges each one, trained on cloud GPUs. Measured against eight independent engines, it plays at about 3495 on the CCRL Blitz scale and beats Ethereal and Halogen, two well-known open-source engines.
The board below replays its latest game on Lichess, straight from Lichess, at double speed: watch a captured piece shatter.
Loading its latest game from Lichess…
The 3495 is an estimate on CCRL's scale from my own games (60+0.6, one thread, GitHub's Linux machines), not an official CCRL listing. Lichess bot ratings sit on a different, lower scale: the strongest bots there are around 3050.
| Opponent | My score | My performance |
|---|---|---|
| Stash 35 | 73.7 % | 3524 |
| Stash 37 | 63.0 % | 3510 |
| Ethereal 12.75 | 59.4 % | 3490 |
| Halogen 11 | 61.2 % | 3504 |
| Koivisto 7.0 | 45.8 % | 3500 |
| Berserk 8.5 | 35.2 % | 3469 |
| Altair 7.0.0 | 39.1 % | 3502 |
| Alexandria 6.0.0 | 27.1 % | 3458 |
1,536 games at 60+0.6 against 8 engines from 7 families, each built from its official release and checked by name. Fitted by maximum likelihood with their ratings held fixed: 3495 ± 11 (3449 ± 11 the day before). Every game is in the repository.
| Change | Elo, measured |
|---|---|
| Neural-network evaluation instead of hand-written tables | +557 |
| Reverse futility pruning | +111 |
| Aspiration windows | +71 |
| Network retrained on Leela Chess Zero data | +65 |
| Self-play fine-tuning of the network | +55 |
| Singular extensions (look deeper when only one move works) · threat-aware move history | +57 |
| Futility pruning · exchange evaluation in search | +72 |
| King-position network inputs · iterative reductions · correction history | +63 |
| Endgame mating technique · smarter time use · exchange pruning | +26 |
| Multi-threaded search, 2 threads vs 1 (the Lichess bot) | +69 |
Each change passed a sequential probability ratio test (grouped rows add their separately measured gains): games stop the moment the evidence is strong enough either way. Seven standard techniques that lost Elo here are logged too, in the test log.
A bigger network judges positions more accurately but runs slower, and a chess engine is racing the clock. I measured both sides: accuracy follows a power law in network width,
and on this engine every 1 % of speed is worth about 1 Elo. Together they put the best width on a desktop near 400 neurons: a 512-wide net was more accurate yet lost 16 Elo to 256, because it searched 19 % fewer positions.
The same positions, relabelled by Stockfish and by a Leela-trained engine, test whether a smarter teacher makes a stronger student. The first run overfit (it saw each position ~26 times), so the comparison is being redone.
Failures stay in the record: training on the "hardest" 25 % of positions picked up label noise and lost 14 Elo to a random 25 %.
Kavin Jain, 18, Udaipur, India. I set the goals, made the design and research decisions, and directed every experiment. The code was written with AI assistance (Claude); every claim on this page links to the games or logs behind it.
Built on open work: Leela Chess Zero training data (ODbL), the bullet trainer, fastchess for testing, and PeSTO tables for the first version. No Stockfish or Leela code or networks are inside the engine.