Gaming · Chess · a bert.bits line
A chess engine that runs in your browser.
NeuralChess is the studio's own engine: C# on .NET 10, alpha-beta search, a small neural network for evaluation. On this site the rules, the clocks and the engine all run on your device as WebAssembly. Nothing is computed on a server.
Version 2.0. Free, no account. Installable, and playable offline after one visit.
- 241 positions the rules agree on 946 move counts checked against Stockfish 16, none failed. The test data is the referee and is never edited to get a green run.
- 45 recorded verdicts in the lab Every search or evaluation idea plays the last accepted build under a sequential test. Only the winners are merged.
- 150 M positions behind the network 150,001,548 positions from 1,609,484 games the engine played against itself. The network file is 197,440 bytes.
- 1.2 M positions a second, in a browser Engine bench at depth 12 in headless Chromium on the build workstation, two runs. The native build does about 2.9 M on the same machine.
On the screen
A board that tells you what the engine sees
- PRESSURE How many of your moves are real "7 real options out of 43 legal moves": the moves within half a pawn of the best one, counted when it is your turn, plus what your last move cost.
- NARRATOR Plain sentences, from engine facts Fixed sentences filled in from what the search found, with a coach toggle. No language model writes them, and none ever picks a move.
- WIN CHANCE A tracker for the whole game Your chance of winning as a line over the game, labeled "modelled" because it is a curve fitted to the evaluation. Click a point to go back to it.
- ENGINE ROOM Look inside the search The other moves it weighed, evaluation by depth, search counters and arrows on the board. Four detail levels, from Focus to Everything.
- IMPORT + REVIEW Bring your own game Paste a PGN, a FEN or a move list and get a review with accuracy and move marks. A review link carries the whole game in the address.
- YOUR DEVICE You set the compute Low to Maximum sets how much memory and side analysis the engine takes, with a meter showing what your device is doing. Four time controls, 3+2 to 15+10.
The mobility operator
Prefer the position that keeps your options open
The oldest idea in NeuralChess, carried from its first engine in 2020, where it was written as causal entropy: of two futures, favor the one with more room to act. In chess terms, count the squares each knight, bishop, rook and queen can safely reach, where a safe square is one not held by its own side and not covered by an enemy pawn. Do it for both sides and take the difference.
A position where your pieces have room and the opponent's do not scores well before anything has been captured. In 2.0 the operator runs at the leaves of the search, as a term in the hand-written evaluation, with separate weights for the middlegame and the endgame blended by how much material is left.
The Pressure panel is the same idea pointed at you: it counts how many of your moves are real options. The neural network now does the judging by default, and the hand-written evaluation stays in the engine behind a UCI switch.
safe = ~(own pieces | enemy pawn attacks)
reach(p) = popcount(attacks(p, occupied) & safe)
mobility = sum over N, B, R, Q of weight[p] * reach(p)
score += mobility(white) - mobility(black) | Centipawns per safe square | Knight | Bishop | Rook | Queen |
|---|---|---|---|---|
| Middlegame | 4 | 5 | 2 | 1 |
| Endgame | 4 | 5 | 4 | 2 |
Measured in the lab: +77.7 ±20.9 rating points over 614 games against the build without it.
Under the hood
Four layers, one referee
- 01 · RULES CORE Bitboards, and nothing allocated Legal moves, check, mate and draws come from one C# library. Move generation, make and unmake allocate no memory. From the start position it counts 119,060,324 positions at depth 6 in about 0.4 seconds on one thread.
- 02 · SEARCH Alpha-beta, pruned hard Principal variation search with aspiration windows, a transposition table, quiescence, null-move pruning, late move reductions, futility and late move pruning, and static exchange evaluation. Moves are ordered by captures, killers and history.
- 03 · NETWORK (768 → 128) × 2 → 1 A small network that sees the board from both sides, with SCReLU activation, updated incrementally as pieces move. It was trained on the engine’s own games, and each generation learns from the one before.
- 04 · BROWSER .NET as WebAssembly The page talks to an arbiter running in a web worker, which owns the rules and clocks and drives the engine in workers of its own. It searches the same tree as the native build, node for node. The React app holds no chess rules at all.
The lab
No engine change merges on a feeling
A new idea is built as its own engine and plays the last accepted build, game after game, until a sequential test says it is stronger or says it is not. Winners stay. Losers are reverted and written down, including the ones that looked obviously right.
The same gate runs in every room of this studio. Here it is a statistical test instead of a person, because a person cannot tell five rating points from luck.
Match conditions: fastchess, 8 seconds plus 0.08 a move, one thread, 64 MB hash. Scores are rating points with the test's error margin.
| The idea | Result | Verdict |
|---|---|---|
| A neural network instead of hand-written evaluation First network, trained on 50 million positions | +298 ±58 · 220 games | KEPT |
| A second network, trained on the first one’s games Three times the data, same size | +225 ±29 · 414 games | KEPT |
| The mobility operator Safe squares for each piece, as a difference between the sides | +77.7 ±20.9 · 614 games | KEPT |
| King safety Pawn shelter, and a penalty that grows with the attackers | +31.8 ±13.7 · 1,282 games | KEPT |
| A network twice as wide Fitted the training data better and new positions worse | −71.6 ±21 | NOT KEPT |
| A bonus for passed pawns Textbook chess knowledge that made it weaker | −17.9 ±11.5 | NOT KEPT |
| Search deeper when in check Undecided after 5,000 games, so it went | +5.91 ±6.66 | REVERTED |
How strong is it
About 2950, with a wide margin and a caveat
That estimate, give or take 150, comes from scoring 57% over 100 games against Stockfish with its strength limited to 2900, at 8 seconds plus 0.08 a move on the build workstation.
That is an engine-against-engine figure, not a rating against people. Expect a hard game, and a narrator that tells you where it turned.
The rules it is built under
Three that do not bend
- The test data is the referee. An expected value is never edited to get a green run.
- No engine change merges on a feeling. It passes the lab or it is reverted.
- A language model never emits a move. Narration is written from facts the engine supplied.
Your move.
Pick a side and a clock. The first load fetches about 3 MB, then it is yours offline.