Part VI — The Data Science of Chess

Every chess player knows the Elo formula's promise even if they've never seen the formula: a 200-point favourite should score about 76%. It's arithmetic — E = 1/(1+10^(−200/400)) = 0.760 — and it's printed in every rating handbook.

So we checked it against what actually happened. Over the board, in classical games between players about 200 FIDE points apart, the favourite scored 72.2%. Online, the figure was 66–69%. The formula over-predicts favourites in every pool we tested, and Chapter 30 finds that the problem isn't the shape of the curve but its scale: the best-fitting scale for FIDE classical is about 478, not 400, and for Lichess about 670–750. Part of the reason is statistical — ratings are noisy, and noisy ratings exaggerate gaps — and part is human: improving juniors are stronger than their ratings say.

The arithmetic was right. The model was a little wrong, measurably, and in a direction you can explain. That is the kind of result Part VI is built to produce.


What this part is for

Parts I–V use data in the service of chess. Part VI turns around and makes the data itself the subject: how ratings work, how to mine millions of games without fooling yourself, how to measure the quality of play with an engine at scale, whether "playing style" can be measured, how chess engines actually work, and how to track improvement honestly.

It is the most technical part of the book, and it is written for two audiences at once. If you are a data scientist new to chess, it shows you a domain with unusually clean data — every move recorded, every position evaluable, millions of games free to download — and unusually instructive traps: self-selected samples, rating pools that can't be compared, metrics that depend on the engine's depth, and the forking paths of a database big enough to "prove" anything. If you are a chess player, it shows you what the numbers on your screen — your rating, your accuracy, your opening statistics — really measure, and how much of them is noise.

How the chapters build

Chapter 30 builds the rating system from Elo's formula, tests it on real results, implements Glicko-2, and asks who beats their rating. Chapter 31 is the database chapter: exactly what the book's snapshot contains, how every filter changes the answer, querying positions rather than opening names, weighting designed samples, and replicating findings before believing them. Chapter 32 turns to engine measurement — ACPL, accuracy and move labels, what they depend on, how two engine set-ups agree, and why one game proves nothing about fair play. Chapter 33 asks whether playing style is real and finds that most of it isn't what people think. Chapter 34 opens the engine: you build a small one, test it with perft, and trace the line from Shannon's 1950 design through Deep Blue and AlphaZero to NNUE. Chapter 35 brings it home to improvement analytics: trends, plateaus, projections and the opening tests that survive a multiple-comparison correction.

Outpost adds Elo and Glicko-2 implementations with a rating simulator (ratings.py), a position and opening query engine (database.py), a cached, parallel batch-accuracy engine (accuracy.py), style features with clustering (style.py), a minimax/alpha-beta engine with perft tests (engine_lab.py), and an improvement dashboard (progress.py).

What the data found

  • Upsets are mostly favourites beating themselves. In OTB classical games with a 200–399-point gap, "in upsets the favourite blundered first 60.7% of the time and fell below five minutes in 55.0% of games (27.9% when the favourite won)" (Chapter 30).
  • Who beats their rating. OTB classical: "ages 12–24 +1.2 to +1.8 points per 100 games, 60+ −4.0; juniors vs adults +6.4; women and men both ≈ 0 among adults" (Chapter 30).
  • Say exactly what you mined. "The book's snapshot is 4,471,751 games (4,000,000 Lichess, 373,918 broadcast rows, 97,833 master games); with 6,193,530 puzzles, 10,665,281 records" (Chapter 31).
  • Query positions, not names. "70.6% of Lichess games reaching the QGD Exchange position arrived by transposition" (Chapter 31).
  • Replicate before you believe. "In the full opening table 42 of 63 findings replicated in the other half; on a 2% subsample, none of 10 did" (Chapter 31).
  • ACPL depends on the game, not only the player. "World champions' ACPL almost triples from games against precise opponents (10.5) to games against error-prone ones (29.0)" (Chapter 32).
  • One game proves nothing about fair play. "8.6% of FIDE 2000–2199 OTB classical player-games reach book accuracy ≥ 97; in an Olympiad field 66% of players had at least one such game" (Chapter 32).
  • Players do not form style types. In 22 champions, 738 OTB players and 801 Lichess players, "k-means silhouettes never beat a Gaussian null with the same correlations." And "sharpness" is mostly an error measure: "r = 0.97 with ACPL across 22 champions and elites" (Chapter 33).
  • Alpha-beta gives the same answer for far less work. "Kasparov–Topalov at depth 3: 81,018 nodes for minimax, 1,832 for alpha-beta with captures first." Stockfish's "effective branching factor of about 1.56 is what lets it reach depth 20 in under a million nodes" (Chapter 34).
  • Detect plateaus on performance, not on the rating level. A detector fed the median rating "reported 'changepoints' in 76% of simulated flat players"; on monthly performance, "4–5%". And "99.3% of simulated players improving every month had a three-month stretch with no new high" (Chapter 35).
  • Project with a range, not a line. "'Stay where you are' beat trend extrapolation in a real backtest (12-month MAE 74 vs 94)" (Chapter 35).

Several of these are negative results, and Part VI is proud of them. No style types. No measurable amateur improvement trajectories in the data. No fair-play conclusion from one game. A plateau that turns out to be a straight line. A data science of chess that only reported positive findings would be selling something; this one reports what the data can and can't support, with intervals.

The cast and the anchors in Part VI

Dev Raman leads this part — it is the most code-heavy stretch of the book, and he builds every module. Grace Mbeki appears where measurement meets competition (Chapters 32 and 35). Sam Whitaker brings his scepticism about engines and "style types" to Chapters 33 and 34 — and in Chapter 33 his old club advice to watch an opponent's opening clock turns out to point at the most reliable trait the data can find.

🎭 Composite data: Dev's and Grace's games are real games by anonymous players at their ratings, assembled into one "player" each. They are never facts about a real person.

Anchor C returns twice: in Chapter 31, where the database's own interval for the English Attack at Dev's level turns out to be thin too, and in Chapter 35 Dev's openings are tested all at once with a false-discovery correction — "Dev's Italian survives; his Najdorf gap is noise". Anchor B returns in Chapter 32 as a test case for engine agreement, and Anchor A's Carlsbad structure is one of Chapter 31's position queries.

Part VI also uses the two public Chess.com archives in the book's data — Hikaru (Nakamura, 71,786 games) and GothamChess (Levy Rozman, 34,410 games) — as real long-run rating histories. Chapter 35 finds a "robust 35-month plateau" in Hikaru's blitz rating and shows that GothamChess's apparent 2022–2024 plateau "is one straight climb (+3.8/month [+3.4, +4.2])". The games include Deep Blue–Kasparov 1997, Chigorin–Steinitz 1895/96, Yurtaev–Carlsen 2004, Hou Yifan–Tan Zhongyi 2026, and current broadcast games from the 2026 Olympiad and Norway Chess.

Chapter by chapter

  1. Chapter 30 — The Elo Rating System. The formula and its update rule, K-factors, calibration against real results, the scale problem, Glicko-2, rating noise and lag, real distributions by pool, and who beats their rating. Outpost: ratings.py.
  2. Chapter 31 — Chess Database Analytics. The snapshot exactly, filters as assumptions, rating-adjusted opening scores, position queries and transpositions, weighting, definitions, reverse causality, and replication. Outpost: database.py.
  3. Chapter 32 — Engine Analysis at Scale. ACPL, accuracy and move labels; depth and set-up; engine agreement; position difficulty; fair-play statistics; and the cost of computing at scale. Outpost: accuracy.py.
  4. Chapter 33 — Playing Style Analysis. Style features, principal components, clustering against a proper null, reliability, and what "aggressive" means at club level. Threshold concept: style is a continuum, not a set of types. Outpost: style.py.
  5. Chapter 34 — Chess AI. Move generation and perft, minimax and alpha-beta, quiescence, evaluation, Deep Blue, AlphaZero, Leela, NNUE, and what engines did to human chess. Outpost: engine_lab.py.
  6. Chapter 35 — Improvement Analytics. What the data can't measure, rating noise, windows and rates, plateau detection, projections, "people like you", and testing every opening at once. Outpost: progress.py.

Two appendices support this part throughout: Appendix D — Metric Encyclopedia and Appendix E — Statistics for Chess Analytics.

Which track should read what

  • ♟️ Improver. Chapter 30's sections on what a rating means and how many games it needs, Chapter 32's sections on what accuracy measures, and Chapter 35 in full — it will change how you feel about plateaus. The prose carries every result; skip the code.
  • 📊 Analyst. This is your part. Read all six chapters with the code. Chapter 31 is the methods core of the book.
  • 🏆 Competitor. Chapters 30 and 32: rating mathematics for tournament play, and what engine accuracy figures do and don't say about you or your opponents.
  • 💻 Developer. All six checkpoints, and Chapter 34 above all — you build and test a working chess engine.

Before you go on

Part VI ends where the reader's own data begins: a dashboard that tells you, honestly, whether you are improving. Part VII takes the tools out into the wider game — online chess, variants, coaching, the culture and community of chess — and then assembles everything you've built into one toolkit.

Chapters in This Part