NeuralChess is the engine behind the chess game on this site. It is written in C# on .NET 10, searches with alpha-beta and evaluates positions with a small neural network. This post is about the part you cannot see when you play it: the lab that decides what goes into the engine.
The rule
No engine change merges on a feeling. A chess engine is full of ideas that sound right, and a surprising number of them make the engine weaker. A person cannot tell the difference by watching games, because the differences are a few rating points and the noise is much larger than that.
So every change is built as its own engine and plays the last accepted build, game after game, under a sequential probability ratio test. The test stops as soon as the evidence is strong enough either way. If the new build is better, it becomes the next baseline. If it is not, the change is reverted and the result is written to the log. All matches here ran in fastchess at 8 seconds plus 0.08 a move, on one thread with a 64 MB hash.
What it kept
The lab log holds 45 verdict files. A few of the results:
- The mobility operator: +77.7 ±20.9 rating points over 614 games. Count the squares each knight, bishop, rook and queen can safely reach, for both sides, and score the difference. The idea is the oldest in the project. It dates from the first engine in 2020, where it was written as causal entropy: prefer the future with more room to act.
- King safety: +31.8 ±13.7 over 1,282 games. Pawn shelter, plus a penalty that grows with the number of attackers.
- A neural network in place of the hand-written evaluation: +298 ±58 over 220 games. The first network was trained on 50 million positions.
- A second network trained on the first one’s games: +225 ±29 over 414 games. Same size, three times the data: 150,001,548 positions from 1,609,484 self-play games.
What it threw out
- A bonus for passed pawns: −17.9 ±11.5. Textbook chess knowledge, and the engine was weaker with it.
- A network twice as wide: −71.6 ±21. It fitted the training data better and new positions worse.
- Searching deeper when in check: +5.91 ±6.66. Still undecided after 5,000 games, so it was reverted. Undecided is not a pass.
The losing ideas matter as much as the winners. Without the test, all three would be in the engine today, because all three are things a chess player would expect to help.
The same gate, everywhere
Every room in this studio has a gate between the machine and the shelf. In most rooms the gate is a person who reads, plays or checks the sources. In the chess lab it is a statistical test, because that is the only honest judge of a five-point difference. The principle does not change: the pipeline proposes, and something that cannot be flattered decides.
House rules in play: 02 (tested before it ships), 05 (the method is published).