Technical Writeup & Open Release
HumanFish: Predicting Who Actually Wins a Human Chess Game
The eval bar on a chess broadcast answers the wrong question. It tells you what happens if two 3600-Elo engines play perfectly with infinite time. What you actually want to know while watching humans play is: who is going to win from here, how likely is a draw, and why?
HumanFish is an open hybrid model trained on 733,441 tournament positions (91,720 human 2400–2900 games)
combining Stockfish 19, Leela Chess Zero, a grandmaster move predictor
(DSC-150M), and live tournament clocks. It outputs calibrated
White Win / Draw / Black Win odds—and shows the concrete moves behind every disagreement right on the board.
Three Real Positions Where Stockfish Misleads
Green arrows are objectively sound; red arrows blunder. Arrow width and badges show our clock-calibrated GM move probabilities; the slim bars compare Stockfish 19 (left) against HumanFish W/D/L (right).
66.7% vs 60.8%
3-Way Outcome Accuracy
Nov 2026 games vs Raw SF19 (67.9% Sept–Oct)
79.2% vs 74.9%
Decisive Winner Pick
Correct winner on decisive Nov games (80.6% Sept–Oct)
48.1% vs 18.1%
Avg Prob on True Outcome
2.7× higher likelihood than Raw SF19 (LL 0.7325 vs 1.7118)
0.83%
Per-Class Calibration Error
Avg error across W / D / B probabilities, Sept–Oct (2.6% on the smaller Nov set)
TL;DR — Future November 2026 Tournaments (450 Games, 3,598 Positions)
Frozen weights scored once on completed November 2026 master/GM games (including World Chess Championship Games
1–2, London Chess Classic Masters, Total Chess Finals, and Jerusalem Masters). For log-loss, lower is better:
0.00 is a crystal ball, 1.10 is guessing 33/33/33.
1. The Core Idea
A natural first attempt at a human eval bar is to run Stockfish MultiPV and look for "only moves"—positions where
the best move is +3.5 and the second-best move is -2.0. That misses half the problem.
Recapturing a hanging queen and finding a quiet prophylactic king retreat look identical to MultiPV, even though
any player finds the recapture 99% of the time and grandmasters miss the quiet move 80% of the time.
MultiPV measures fragility. It doesn't measure obviousness. To get both, you pair an engine (what is objectively true) with a human move model (what a player at that Elo will actually play). Then you add two things super-GM games actually turn on: Leela Chess Zero (which sees fortresses and long-term compensation differently from Stockfish) and the clock.
Finally, we predict three probabilities (White Win, Draw, Black Win) instead of a single number. A
0.00 Berlin endgame (4 / 92 / 4) and a 0.00 time-scramble Najdorf
(32 / 36 / 32) both sit at 50% expected score, yet one game is over and the other is on fire.
Tower numbers are exact leave-one-group-out log-loss drops under the same LightGBM learner on
Dev-Test (N = 24,601). Every tower pulls real, non-redundant weight.
Data Hygiene (The Traps That Bite You)
We pulled all 82 monthly archives of the Lichess Broadcast Database (2020-01 to
2026-10). Three subtle bugs will quietly wreck your dataset if you don't look at raw PGNs:
1. Engine tournaments live inside Lichess Broadcasts. TCEC (3300–3500 Elo) is relayed right
alongside human events. If you only filter Elo ≥ 2400, Stockfish-vs-Leela games pollute your
"2700+ human" set. We enforce 2400 ≤ Elo ≤ 2900, Standard chess only, and block engine/Chess960
relays.
2. Clock headers are messy—and easy to leak. Over 30% of broadcast games say
TimeControl="?" or free text. When tournament rules are in the header, we parse them directly.
Otherwise we infer initial time, increment, and move-40 status strictly from %clk timestamps
already observed before the current ply—never peeking ahead at move 40 or how long the game lasts.
3. Position sampling matters. From each deduplicated game (≥ 16 plies,
≥ 60% valid clocks) we take 8 positions: one random ply from [0, 5], one from
[6, 11], and one from each of 6 equal buckets spanning [12, total_plies - 1]. Long
endgames can't drown out the rest, and the very first moves are in the data (76.6% of test positions have
|SF cp| ≤ 80; only 14.1% are > 200 cp).
4. Start from the base rate. At move 1 the board says almost nothing, so the right answer is
the historical result rate for these two ratings at this time control. A tiny multinomial logit on
(avg Elo, Elo gap, time control), fit on one row per training game, supplies that prior as four
input features. Two 2750s in classical start at 22 / 65 / 13; two 2450s in blitz start at
43 / 19 / 38. The board features then move the bar away from it as the game develops.
Splits, Compute & Honest Scope
Train: 2020-01–2026-06 (679,557 positions / 84,979 games; 41,585
at 2700+).
Val (early stopping, blend & calibration): 2026-07–2026-08
(29,283 positions / 3,663 games).
Dev-Test: 2026-09–2026-10 (24,601 positions / 3,078 games / 91
events / 943 players). Held out from training and used during development.
Prospective Holdout: 2026-11-01–2026-11-26 (3,598 positions /
450 games / 13 tournaments / 185 players), frozen weights scored once.
Time-control mix: Broadcast archives mix all OTB formats, and we keep all three while
conditioning on time control explicitly: Train is 62.2% Classical /
16.6% Rapid / 21.2% Blitz; Dev-Test is 82.8% Classical /
11.3% Rapid / 6.0% Blitz; Prospective Nov 2026 is 51.6%
Classical / 26.9% Rapid / 21.5% Blitz. Classical-only slices are broken out separately below.
Cost: Feature extraction across 733k positions ran on Spot NVIDIA L4s (DSC-150M
at 360 pos/s + lc0-cuda 200n) pipelined into 16 Spot 64-vCPU machines (Stockfish 19 250k +
2-ply refutation at 76 pos/s per box). Total compute was under $50.
Scope caveat: Our statistical power is strongest across 2400–2900 master/GM play and 2600+ GMs. Pure 2700+ samples are still small (101 games dev; 57 games Nov), so event-clustered 95% intervals on 2700+ alone remain wide. We report them explicitly below.
2. Prospective Test: November 2026 (Scored Once, Frozen Weights)
Once you iterate on a test set (even without tuning hyperparameters on it), it stops being truly sealed. So we froze every model weight and calibrator, pulled 450 completed human 2400+ games played between November 1 and November 26, 2026 across 13 tournaments, and evaluated them once.
The gain held—and slightly widened—on future games. Frozen HumanFish (0.7325) beats the matched
same-learner LightGBM Stockfish baseline (0.7597) by -0.0271 (tournament-clustered
95% CI [-0.0376, -0.0094], p = 0.006) and clean SF19 + Clocks
(0.7488) by -0.0163 (p < 0.0005). It also beats No-DSC SF19 + Lc0 +
Clocks (0.7371) and Raw DSC-150M (0.7855).
3. What Actually Matters? Same-Learner Ablations
An easy mistake in tabular ML is comparing a simple linear baseline against a heavy GBDT ensemble and crediting
the entire win to your fancy features. Indeed, our initial 10-feature logistic Stockfish baseline got
0.7806 on Dev-Test, whereas training the exact same 3-seed LightGBM learner on
just Stockfish 19 + Elo + board features already drops it to 0.7403. About two-thirds of the naive
gap was model class.
The remaining -0.0217 nats on Dev-Test (0.7186 vs. 0.7403) and
-0.0271 on November 2026 is pure feature signal. To isolate each piece cleanly, every
cumulative step and Leave-One-Group-Out (LOGO) drop strips out every direct and interaction
feature derived from that component, using the exact same 3-seed LightGBM learner:
All four towers earn their keep. Dropping any one of them—along with all of its derived
interactions—hurts log-loss cleanly under 91-event clustering (all p ≤ 0.0005):
Causal OTB Clocks (+0.0052), DSC-150M + Regret
(+0.0039), Leela Lc0 (+0.0034), and Stockfish 19 +
Regret (+0.0023). Explicit 1-ply/2-ply regret adds only +0.0002 on top of
all three engines (p = 0.03), and SF MultiPV/depth adds nothing measurable on top of everything
else (-0.0002, vs. -0.0029 on SF alone); we keep both because they power the
on-board arrows and refutations.
Are the Error Bars Real? (Game vs. Event vs. Player Clustering)
Resampling by game assumes games in the same tournament or by the same player are independent. They aren't. Clustering by event (91 tournament clusters) or player (943 players) widens the 95% intervals—and every major win still clears zero cleanly:
Did DSC-150M Leak Into Our Training Set?
Good question: DSC-150M was fine-tuned on classical OTB games up through mid-2026, which overlaps our
2020–2026-06 training window (though not our 2026-09/10 or 2026-11
test sets). That can't inflate test scores, but it could make our ensemble over-trust DSC-150M
if its predictions were sharply overfit on training games.
We checked directly: on Classical OTB, DSC-150M's raw WDL log-loss is 0.7564 on Train
(N = 62,188), 0.7625 on Val, 0.7506 on post-cutoff Dev-Test, and
0.7293 on Prospective Nov 2026 (Top-1 move accuracy: 63.9% Train vs. 63.0%
Dev-Test and 64.1% Nov). Because DSC-150M was pretrained on 1.28B positions with only
two light fine-tuning passes, there is essentially zero in-sample WDL overfitting. We also tested down-weighting
DSC-150M by blending our Full model with a No-DSC (SF19 + Lc0 + Clocks) model on Val;
re-blending left out-of-sample log-loss essentially unchanged (0.7186 → 0.7185 dev;
0.7325 → 0.7323 Nov), confirming the ensemble isn't being misled by stacking leakage.
4. Where Do the Gains Actually Come From?
A fair worry with any chess outcome model is that late, already-decided positions inflate aggregate metrics.
Slicing by move number, material phase, and objective decidedness
shows the opposite: the lift over Stockfish is largest in sharp positions (-0.0331),
openings after move 6 (-0.0283; -0.0326 in Nov) and middlegames
(-0.0276 to -0.0281), and smallest once the board is already decided
(|cp| > 200: -0.0172).
The first six moves are the honest exception. There the board barely matters, every model collapses to the
Elo/time-control base rate (log-loss ≈ 0.95 for all of them), and HumanFish adds only
-0.0055. What matters is that the bar starts in the right place: predicted draw rate on moves 1–6
is 51% against 50% actual on Dev-Test, and 48% against 48% in
November.
Every subgroup excludes zero under event clustering except two: moves 1–6 (-0.0055, Event CI
[-0.0086, +0.0002]), where the base rate dominates, and the thin 2700+ slice (101
games / 19 events, -0.0182, [-0.0473, +0.0087], p = 0.096). At
2600+ GM (458 games / 31 events), the gain is -0.0268
([-0.0429, -0.0140], p < 0.0005).
5. Calibration (Per-Class & Tails) and Move-Level Explanations
Expected-score calibration can fool you: predicting 50/0/50 instead of 20/60/20 has
zero expected-score error while getting every class wrong. Below we measure sample-weighted Expected Calibration
Error ECE = Σ (n_b / N) |mean(p_b) - mean(y_b)| across 11 tail-resolved bins
([0,5%), [5,15%), ..., [85,95%), [95,100%]) separately for White Win,
Draw, and Black Win, plus Tail ECE restricted to extreme
predictions (< 15% or ≥ 85%).
Macro per-class ECE is 0.0083 (vs. 0.0157 same-learner LGBM SF19,
0.0400 raw DSC-150M, and 0.1972 raw Stockfish 19). White-win and Black-win tail
errors sit at 0.29% and 0.38% (draw tail: 1.16%).
Per-Class Calibration by Rating, Phase & Time Trouble
Calibrated Move Arrows: System 1 Intuition + System 2 Calculation
Outcome log-loss validates the eval bar, not the percentages on the board arrows. Raw DSC-150M is
pure 1-ply intuition—it doesn't search and it doesn't see the clock. On routine moves that's fine. On a hard
saving move (Stockfish only-move gap ≥ 8 pp, DSC-150M < 30%), it fails badly: a
grandmaster smells danger, burns clock, and solves the tactic 45.5% of the time on Dev-Test
(47.4% in Nov 2026) even though 1-ply intuition says 13.8%. At the same time, raw
DSC-150M over-predicts tempting blunders (26.5% predicted vs. 14.0%
actually played).
The fix is one tiny model that mirrors how humans actually choose moves: start from 1-ply intuition
(α · log p_DSC(m)), add a learned calculation offset from a 157 KB pure-NumPy residual MLP
conditioned on Stockfish move quality, d6/d12 tactical visibility, Elo, and the mover's clock, and
normalize with a single softmax over candidates plus an "other moves" bucket.
Trained on 80k positions and audited with exact zero-truncation probabilities, it cuts move cross-entropy by
-0.1107 nats on Dev-Test (1.0017 → 0.8910, p < 0.0005) and
-0.1098 nats on Prospective Nov 2026 (1.0035 → 0.8937). Top-1 move accuracy rises
from 62.2% → 66.6% (Nov: 62.5% → 65.9%), Nov arrow ECE drops nearly 3×
(0.0116 → 0.0044; Dev 0.0035), and hidden saving moves jump from 13.8%
raw to 42.5% calibrated—right next to the actual 45.5%:
Model attribution without SHAP noise: Telling a viewer that dsc_d_white shifted
draw odds by +14% says nothing about the board. Instead, the live viewer splits HumanFish - Stockfish
into Board Practicality (equalized Elos) plus an order-invariant 2-ordering Shapley split
between Rating Gap and Clock Pressure, paired with clock-calibrated arrows.
(This is model attribution, not ground-truth causation.) In Carlsen vs. Niemann (81...Ba3, blitz with 34s
left), Stockfish says 51.6% while HumanFish says 80.0% (+23.5 board,
+3.2 Elo, +1.7 clock): Stockfish's lone drawing move Kf8 shows as a
dashed 5% green arrow (0.9% 1-ply intuition) surrounded by four thick red blunder
arrows (Bd2, Bb2, Be3, Ba3). Niemann played Ba3 and lost.
See it live on the board →
6. Downloads & Run It Yourself
All training code, GCP Spot fleet scripts, trained model weights, raw audit JSONs, and enriched game traces are
right here. All of our code should be considered public domain—use, modify, or redistribute it
however you like (upstream engines and third-party weights retain their own licenses). The CPU bundle runs live
on any laptop with Stockfish 19 and DSC-150M (no GPU or Lc0 needed).
Upstream Weights, Engines & Data
2-Minute Local Quickstart
# 1. Unpack source and place the CPU model bundle
tar -xzf humanfish-source.tar.gz && cd humanfish
mkdir -p artifacts bin/stockfish
mv /path/to/humanfish_cpu_bundle.joblib /path/to/humanfish_move_policy.joblib artifacts/
# 2. Install Python 3.12 dependencies (CPU-only PyTorch keeps install under 250 MB)
python3 -m venv .venv && source .venv/bin/activate
pip install --index-url https://download.pytorch.org/whl/cpu torch
pip install python-chess lightgbm catboost scikit-learn scipy pandas pyarrow joblib fastapi uvicorn requests zstandard safetensors
pip install --no-deps "git+https://github.com/ChessDS/chessds-dsc.git@v0.1.0"
# 3. Grab Stockfish 19 binary
curl -sL https://github.com/official-stockfish/Stockfish/releases/download/sf_19/stockfish-linux-x86-64-universal.tar.gz | tar -xz -C bin/
# 4. Launch the live viewer & API (DSC-150M downloads automatically on first call)
uvicorn webapp:app --app-dir src --host 0.0.0.0 --port 8842