Appendix D — Metric Encyclopedia

This book measures chess. Forty chapters compute win percentages, accuracies, space counts, threat sizes, conversion rates and rating residuals — and a number is only useful if everyone who quotes it means the same thing. This appendix collects every metric the book uses, one entry each, in one place.

Each entry gives:

  • Definition — in words, precise enough to recompute;
  • Formula — where there is one;
  • Code — the function that computes it: the toolkit (chessdata as cd, engine as en, structures as st) for the canonical metrics, or the Outpost module (from outpost import ...) that a chapter built;
  • Introduced — the chapter that first defines or develops it;
  • Pitfalls — the ways it misleads.

The worked numbers come from appendices/code/d01_metrics.py (output in d01_metrics.out.txt), from the toolkit examples in Appendix B, and from the reference tables of the book's data snapshot; nothing is quoted from memory. The statistics that sit on top of these metrics — intervals, sample sizes, adjustments — are in Appendix E.

📐 Definition — canonical metric. A metric defined once in toolkit/chessdata.py (or structures.py) and imported everywhere. Chapters may build new metrics in their Outpost modules, but never redefine a canonical one silently. If a chapter uses a variant (the cp-based blunder threshold of Chapter 32, a chapter-specific "time trouble" rule), it says so.

Families

Family Entries
D.1 Engine evaluation evaluation, win %, CPL and ACPL, move accuracy, game accuracy, classification, critical moment, decisive ply, first blunder, slide, alive position, safe moves and gap, top-move match, threat size
D.2 Material and phase material, non-pawn material, phase, pure endgame, endgame start, material signature, imbalance, implied piece value, pawn price
D.3 Ratings and results score, rating band, balanced game, speed class, expected score, Elo update, performance rating, rating-adjusted score, calibration and scale, White's edge
D.4 Position features mobility, activity, bishop quality, outpost, space, control, centre type, hole, weak colour complex, pawn features, structure labels, weakness count, king shelter, king zone and attack weight, development, tempo, the planning checklist, null-move threat, safe mobility, zugzwang test, forcing moves, motifs, sacrifices, attack conditions, compensation, endgame metrics
D.5 Clock and practical play time spent, clock fraction, time trouble, time on critical moments, snap move, flag in a winning position, lost/saved, sessions and tilt
D.6 Openings, opponents and training database expectation, verdicts, shrinkage and study priority, coverage, book exit, move cost and must-know score, practical residual, predictability, own-average comparison, decided-in-phase, puzzle window, weakness z
D.7 Style and progress sharpness, material-giving moves, tension, king pressure, style space, improvement rate, plateau

D.1 Engine-evaluation metrics

Evaluation (centipawns, White's point of view)

  • Definition. Stockfish 19's estimate of the position, in pawns (or centipawns, 1/100 pawn), from White's point of view: +0.83 means White is better by about 0.83 of a pawn; a forced mate is written #5 / #−5.
  • Code. en.evaluate(fen, depth=18)["cp"] (and ["mate"]); stored [%eval] comments via cd.parse_movetext. Clipped version: cd.eval_to_cp(cp, mate) → ±1000 cap, mate = ±1000.
  • Introduced. Chapter 1.
  • Worked number. The starting position is +0.30 (Stockfish 19, depth 20); 1.e4 is the best move.
  • Pitfalls. Always state the depth — Kasparov–Topalov's 24.Rxd4 is Stockfish's choice from depth 12 to 32 but rated −0.46 at depth 12 and −0.17 at depth 32. State single-line vs multi-line ("multipv 3"): the QGD position of Appendix B reads +0.43 single-line and +0.53 in a three-line search at the same depth. Engine scores in UCI output are from the side to move (Appendix C). Stored Lichess and broadcast evaluations come from other engines and depths than the book's Stockfish 19 — "indicative" for broadcast data.

Win % (Lichess model)

  • Definition. The expected winning chances of a side, from its evaluation, on a 0–100 scale.
  • Formula. win% = 50 + 50 · (2 / (1 + e^(−0.00368208 · cp)) − 1), with cp from that side's view, clipped to ±1000; a mate counts as ±1000 (97.5 / 2.5).
  • Code. cd.win_pct(cp, mate=None); en.evaluate(...)["win_pct_white"].
  • Introduced. Chapter 1; developed in Chapter 32.
  • Worked numbers.

text cp 0.0 25.0 50.0 100.0 150.0 200.0 300.0 500.0 700.0 1000.0 win% (mover) 50.0 52.3 54.6 59.1 63.5 67.6 75.1 86.3 92.9 97.5 mate -> clipped to 1000: 97.54 2.46 cp needed for 75% / 90%: 298 597

  • Pitfalls. It is a model fitted to Lichess games, not a law: the book's calibration in Chapter 1 found that positions around +3.00 were converted 63.6% of the time in Lichess games below 1200 but 88.6% in OTB games of FIDE 2200+ players, against a model value of 75.1%. The same evaluation means different things at different levels. The curve flattens past ±5 pawns, which is the point: a pawn lost at +7 barely matters.

Centipawn loss (CPL) and ACPL

  • Definition. The evaluation a move gives away, from the mover's view; ACPL is the mean over a player's moves.
  • Formula. CPL = max(0, eval_before − eval_after), both from the mover's point of view and clipped to ±1000; ACPL = mean(CPL).
  • Code. cd.cpl(before, after), cd.acpl(evals_white_cp, side="white"); per game, en.game_summary(df); per table, game_features.white_acpl etc.
  • Introduced. Chapter 26 and Chapter 29; at scale in Chapter 32.
  • Worked numbers. The Opera Game at depth 16: Morphy 7.5, the allies 59.9. Typical Lichess blitz ACPL by the player's own rating (±50): 85.7 at 1000, 69.3 at 1500, 56.9 at 2000, 43.6 at 2500; OTB classical relay evals (FIDE, indicative): 40.5 at 1500, 28.5 at 2000, 16.6 at 2500.
  • Pitfalls. The same 100 cp means very different things in a level and a decided position:

text +0 -> -100: cpl 100, win-% drop 9.1, class inaccuracy, cp-class mistake +300 -> +200: cpl 100, win-% drop 7.5, class inaccuracy, cp-class mistake +700 -> +600: cpl 100, win-% drop 2.8, class ok, cp-class mistake clip effect: +2500 -> +1200 cpl = 0.0

ACPL is inflated by moves in already-decided positions, depends on the clip and on engine depth, and is not comparable between pools (Lichess server evaluations vs OTB relay evaluations). Medians are less sensitive than means.

Move accuracy

  • Definition. A 0–100 score for one move, from the win % the mover gave away.
  • Formula. accuracy = 103.1668 · e^(−0.04354 · Δ) − 3.1669, clipped to [0, 100], where Δ = win% before − win% after (mover's view).
  • Code. cd.move_accuracy(wp_before, wp_after); per ply in en.analyse_game(...)["accuracy"].
  • Introduced. Chapter 26, Chapter 32.
  • Worked numbers.

text drop 0.0 2.0 5.0 10.0 15.0 20.0 30.0 50.0 80.0 accuracy 100.0 91.4 79.8 63.6 50.5 40.0 24.8 8.5 0.0

  • Pitfalls. Strongly non-linear: one blunder (accuracy near 50) costs as much as ten small inaccuracies.

Game accuracy (book definition)

  • Definition. The arithmetic mean of a player's move accuracies in a game (or a phase of a game).
  • Code. cd.game_accuracy(evals_white_cp, side="white"), en.game_summary(df).accuracy, game_features.white_accuracy, *_acc_{opening,middlegame,endgame}.
  • Introduced. Chapter 24 (phase accuracy), Chapter 26, Chapter 32.
  • Worked number. The Opera Game: Morphy 98.2, the allies 88.9.
  • Pitfalls. Not the number Lichess displays (Lichess blends a volatility-weighted mean and a harmonic mean, which runs lower) and not Chess.com's "Accuracy" (CAPS, proprietary — the Chess.com archive columns accuracy_white/black are CAPS). Never compare across definitions. Lichess accuracy exists only for analysed games, a self-selected subset.

Move classification: inaccuracy, mistake, blunder

  • Definition. A move whose win-% drop (mover's view) is at least 5 (inaccuracy), 10 (mistake) or 15 (blunder) points — Lichess's convention (0.1 / 0.2 / 0.3 on its −1…+1 scale).
  • Code. cd.classify_move(wp_drop); the older centipawn variant cd.classify_move_cp(cp_loss) uses 50 / 100 / 300 cp.
  • Introduced. Chapter 9 (blunder, punished), Chapter 26; the cp variant only in Chapter 32.
  • Worked numbers. From a level position (0.00), 5 / 10 / 15 win-% points correspond to losing about 54 / 110 / 168 cp.
  • Pitfalls. The cp thresholds call a 100-cp slip at +7.00 a "mistake"; the win-% thresholds call it nothing (D.1, CPL). The 15-point line is a convention, and an evaluation is a noisy measurement: near a threshold, a different depth can change the label. Around repeated positions a full-game analysis can show a spurious 0.00 (Stockfish scores the repetition as a draw), labelling sound moves as blunders — see the repetition pitfall under Critical moment below.

Critical moment

  • Definition. A single ply after which White's win % changes by 15 points or more, in either direction.
  • Code. Count: outpost.clock.count_critical(evals_white_cp, start_cp=20, threshold=15); list: outpost.clock.critical_moments(plies), outpost.review.critical_moments(...). Note that en.critical_moments(df, n=3) is different: the n largest drops, whatever their size.
  • Introduced. Chapter 13; used in Chapter 26.
  • Worked numbers. Lichess blitz games average 4.82 critical moments (median 4); only 25.6% have exactly two or three. The Opera Game has none at depth 16 — its largest single drop is 13.5 points (9...b5): Morphy won without a single collapse by his opponents, just a series of slow moves.
  • Pitfalls. The folklore "most games are decided by two or three critical moments" is not supported (Chapter 13: exactly 2–3 in 26.3% of decisive blitz and 26.9% of decisive OTB classical games). A game decided by a slide of several small errors has none.
  • Pitfall — repetitions. en.analyse_game passes the move history to Stockfish, which scores a repeated position inside its search as a draw; in checking sequences or shuffles that repeat positions this can produce spurious 0.00 evaluations and hence false blunders and false critical moments. Because the engine cache is keyed on the position without history, whichever call evaluated a position first fixes its cached value (Appendix B, B.11). Re-check a suspicious 0.00 with en.evaluate on the bare FEN. The effect turned up in practice in Chapter 28.

Slide

  • Definition. Two or more consecutive moves by the same player, each costing at least 5 win-% points, that together cost more than 15 — one misunderstanding spread over several moves.
  • Introduced. Chapter 26.
  • Pitfalls. Invisible to the critical-moment threshold; review slides by reading the plan, not the single move.

Decisive ply and first blunder

  • Definition. Decisive ply: the first ply after which White's win % stays outside [10, 90] for the rest of the game. First blunder: the first move losing ≥ 15 win-% points, and who played it.
  • Code. game_features.decisive_ply, first_blunder_ply, first_blunder_side; "decided in phase X" = the phase of the position before the decisive ply (outpost.training).
  • Introduced. Chapter 25.
  • Worked number. Decisive Lichess blitz games (n = 182,232) were decided in the opening 4.4%, middlegame 47.3%, endgame 19.0%, on the clock 22.1%.
  • Pitfalls. Needs evaluations on every move (analysed games only on Lichess). A game won on time after being lost has no decisive ply in the evaluation sense — count time forfeits separately, as Chapter 25 does.

Alive position

  • Definition. A position whose evaluation from the mover's view is within ±3.00 (|cp| ≤ 300): the game is still being contested.
  • Code. outpost.accuracy.ALIVE_CP = 300, outpost.review.ALIVE_CP; outpost.review.first_error(plies, side) finds the side's first mistake while the game was alive.
  • Introduced. Chapter 26, Chapter 32.
  • Pitfalls. ACPL over all moves mixes alive and dead positions; acpl_alive in outpost.accuracy.player_games separates them.

Safe moves, gap and only-move positions

  • Definition. With Stockfish's best three moves (MultiPV 3): a move is safe if it is within 5 win-% points of the best; the gap is the mover's win-% difference between the best and second-best move; an only-move position has exactly one safe move.
  • Code. outpost.accuracy.safe_moves(fen, lines, margin_wp=5.0), outpost.accuracy.best_second_gap(fen, lines), outpost.style.best_gap(...).
  • Introduced. Chapter 13, Chapter 32.
  • Worked number. Chapter 13: errors in 13.3% of positions with one safe move vs 2.6% with three.
  • Pitfalls. Depends on the number of lines searched; with MultiPV 3 a position can have at most three safe moves.

Top-move match and the match z-score

  • Definition. The share of a player's scoreable moves equal to the engine's first choice; scoreable = past the opening book (ply > 16), alive, and with more than one legal move. The match z-score compares observed matches with the sum of per-position match probabilities: z = (observed − Σp) / √Σp(1−p).
  • Code. outpost.accuracy.scoreable(df), outpost.accuracy.match_z(matches, probs); outpost.style.engine_choice_features(...)["top_match"].
  • Introduced. Chapter 32.
  • Pitfalls. Matching rates depend on the position mix (forced recaptures match by necessity). The book's match_z shows the shape of an intrinsic-performance test; real fair-play screening needs much richer models and many games. Never treat a high match rate in a few games as evidence of anything.

Threat size (null-move test)

  • Definition. Let the side to move pass (a null move); the opponent's best move in that position is the threat, and its size is the mover's win % now minus the mover's win % if it passed. The book calls it a threat when the size is ≥ 10 points.
  • Code. outpost.prophylaxis.threat(board, depth=16) → move_san, size, wp_now, wp_if_pass; THREAT_THRESHOLD = 10.
  • Introduced. Chapter 7.
  • Worked number. Karpov–Unzicker, Nice Olympiad 1974, after 24.Ba7 (Black to move): White's best "threat" if Black passed is Bc2, worth only 2.2 points (41.3 → 39.1) — below the threshold. The bishop on a7 had already done its prophylactic work.
  • Pitfalls. The null-move test also flags positions in the middle of an exchange (a recapture pending), so "threat" is broader than a prophylactic "plan"; Chapter 7 filters quiet situations. A position with the side to move in check has no null move.

D.2 Material and phase

Material and non-pawn material

  • Definition. Material = sum of piece values for one side (P 1, N 3, B 3, R 5, Q 9; the king has none). Non-pawn material counts only N/B/R/Q; the starting position has 62 for both sides combined.
  • Code. cd.material(board, color), cd.non_pawn_material(board, color=None), cd.PIECE_VALUES; outpost.material.material_balance(board).
  • Introduced. Chapter 1, Chapter 6.
  • Pitfalls. Mid-exchange positions show a false imbalance — measure material at a stable position (D.2, endgame start) or over several plies (D.2, imbalance).

Phase (book definition)

  • Definition. Endgame once the combined non-pawn material of both sides is ≤ 26; otherwise opening while ply ≤ 20 (the first ten moves each), else middlegame. A pure endgame is an endgame with no queens.
  • Code. cd.phase_of(board, ply=None), cd.is_pure_endgame(board); cd.ENDGAME_MATERIAL_THRESHOLD = 26, cd.OPENING_MAX_PLY = 20; game_features.endgame_ply, pure_endgame_ply.
  • Introduced. Chapter 1, Chapter 13, Chapter 14.
  • Worked numbers. After 20 plies of a QGD in which two pairs of minor pieces have been traded (non-pawn material 50), the phase is still opening (ply 20). Under this definition 63.3% of OTB games reach an endgame and 52.2% a queenless one (Lichess, weighted: 51.8% and 38.7%).
  • Pitfalls. The threshold is generous — a position with a queen and a rook each (28) is not an endgame, but one with two rooks and a minor each (26) is. The folklore "~25% of games reach a pure endgame" uses a different definition; always state which one you use.

Endgame start (first stable position)

  • Definition. The first position at or after the endgame threshold whose next move is not a capture — so material is not measured in the middle of an exchange.
  • Code. outpost.endgame_stats.endgame_start(game_or_sans), outpost.minor_endings.first_minor_endings(...).
  • Introduced. Chapter 17, Chapter 18.
  • Pitfalls. Counts defined by "first stable position" differ from counts defined by the stable-imbalance rule of Chapter 6; quote each with its own definition.

Material signature

  • Definition. The pieces of each side, strongest first, White first, kings implied: RB-RN, R-R, Q-RR; pawn endings as KP-K, KP-KP, K-K.
  • Code. cd.material_signature(board); game_features.endgame_signature, final_signature; outpost.endgame_stats.coarse_signature(sig) merges bishops and knights (Rm-Rm).
  • Introduced. Chapter 14, Chapter 18.
  • Pitfalls. It ignores pawn counts (R-R covers rook endings a pawn up and level); pair it with endgame_pawn_diff.

Material imbalance (stable)

  • Definition. Different sets of pieces (rook vs minor, queen vs two rooks, bishop vs knight…), counted when the same imbalance holds over four consecutive positions; side A is the side with the heavier piece.
  • Code. outpost.material.classify_imbalance(board), stable_imbalances(game, min_plies=4), lookup_score(category, pawn_balance, band).
  • Introduced. Chapter 6.
  • Worked number. The exchange-up side with level pawns scored 73.1% in OTB classical games (n = 11,592).
  • Pitfalls. Results include the rating gap (stronger players win material more often) — use the rating-adjusted score (D.3).

Implied piece value and pawn price

  • Definition. Implied value: a piece's coefficient in a model of the result (or the engine evaluation) as a function of material differences, scaled so the knight is 3. Pawn price of an imbalance: the number of extra pawns at which the side with the imbalance scores 50% (logistic 50% point).
  • Code. Chapter 6 scripts 01_piece_values.py, case_study_02.py.
  • Introduced. Chapter 6.
  • Worked numbers. From 137,264 quiet OTB positions, knight fixed at 3: P 1.12, B 3.06, R 4.81, Q 9.01; bishop pair +0.27. The exchange is worth about 1.8 pawns OTB.
  • Pitfalls. The pawn coefficient absorbs passed-pawn value; values depend on the phase (the pawn is worth more in endgames). Not rating-adjusted pawn prices are biased by the rating gap.

D.3 Ratings and results

Score

  • Definition. (wins + ½ draws) / games, always from a named side's perspective (White, the owner of a structure, the side a pawn up, the player).
  • Code. cd.score(result, side); score_white columns.
  • Introduced. Chapter 1, Chapter 17.
  • Pitfalls. A score is not a win rate: 50% can be all draws or half wins and half losses. Its variance depends on the draw rate (Appendix E, E.2).

Rating band and balanced game

  • Definition. 200-point bands of the average of the two ratings (<1000, 1000-1199 … 2400+); many tables merge the lowest two as <1200. A balanced game has |rating difference| ≤ 100. Opening and structure statistics use balanced games unless stated.
  • Code. cd.rating_band(r), cd.rating_bands(series); cd.lichess_games(balanced=True); outpost.database.band_of.
  • Introduced. Chapter 2 onwards; formal treatment in Chapter 31.
  • Worked number. A game between a 1590 and a 1612 has average 1601: band 1600-1799, balanced.
  • Pitfalls. The band of the average is not either player's band. Bands in different pools (Lichess vs FIDE) are different populations. rating_bands returns a categorical — use observed=True in groupby.

Speed class

  • Definition. Lichess: estimated duration = base + 40 × increment (seconds); ultrabullet < 29, bullet < 179, blitz < 479, rapid < 1499, classical ≥ 1500. OTB (FIDE): base + 60 × increment; blitz ≤ 10 min, rapid > 10 and < 60 min, standard (classical) ≥ 60 min.
  • Code. cd.speed_from_tc("180+2") (Lichess, seconds-based tags); broadcast_games.speed; outpost.tournament.time_class(...).
  • Introduced. Chapter 27 (FIDE), Chapter 36 (Lichess).
  • Worked numbers. 120+1 → est 160 s → bullet; 180+0 → blitz; 480+0 → rapid; 1500+0 → classical.
  • Pitfalls. The two formulas differ, so "rapid" online and "rapid" OTB are different categories. Broadcast TimeControl tags mix minutes and seconds — never feed them to speed_from_tc.

Expected score (Elo)

  • Definition. The score a player rated R_A is expected to make against R_B under the logistic Elo model.
  • Formula. E_A = 1 / (1 + 10^((R_B − R_A)/400)); the two players' expectations sum to 1. Elo's original normal model: Φ((R_A − R_B)/(200·√2)).
  • Code. cd.expected_score(ra, rb); outpost.ratings.expected_score_normal, gap_for_expectation(p).
  • Introduced. Chapter 2 (as the yardstick of rating-adjusted scores), Chapter 30.
  • Worked numbers. Gap 0 → 0.500; 50 → 0.571; 100 → 0.640; 200 → 0.760; 400 → 0.909; 800 → 0.990.
  • Pitfalls. E is a score, not a win probability. In real games the formula over-predicts favourites: at a gap of about 200 the formula says 76.0%, OTB classical games give 72.2%, Lichess blitz 68.0%. Applied to Lichess Glicko-2 ratings it is an approximation.

Elo update and K-factor

  • Definition. R' = R + K · (S − E). Under current FIDE regulations (check the FIDE Handbook): K = 40 for new players (until 30 rated games) and for players under 18 rated below 2300; 20 for players who have never reached 2400; 10 once a player has reached 2400.
  • Code. cd.elo_update(r, expected, actual, k=20); outpost.ratings.fide_k_factor(...), elo_series(...); outpost.tournament.rating_change(...).
  • Introduced. Chapter 27, Chapter 30.
  • Worked number. A 1500 player with E = 0.36 who wins, K = 20: 1500 + 20 × 0.64 = 1512.8.
  • Pitfalls. Lichess and Chess.com do not use Elo updates (Glicko-2 / Glicko-based, with rating deviations).

Performance rating

  • Definition. The rating at which the expected score against the opponents actually faced equals the points scored.
  • Formula / methods. Iterative (book default): solve Σ E(R, r_i) = score by bisection; linear: mean(opp) + 400 · (W − L)/n; FIDE: mean(opp) + dp(p), dp = 200√2 · Φ⁻¹(p), |dp| ≤ 800. A 0% or 100% score has no finite iterative answer; the toolkit returns the average ∓/± 800.
  • Code. cd.performance_rating(opps, score, method="iterative"); monthly in outpost.progress.perf_rating.
  • Introduced. Chapter 27, Chapter 35.
  • Worked numbers. 2.5 / 3 against 2650, 2700, 2720: iterative 2971.2, linear 2956.7, FIDE 2963.6. 6.5 / 9 against nine 2000s: 2166.0 / 2177.8 / 2166.7. 4.5 / 7 against 1800s: 1902.1 (iterative).
  • Pitfalls. Over a handful of games a performance rating is very noisy; one win changes it by tens of points.

Rating-adjusted score (residual, "adj")

  • Definition. The actual score minus the mean Elo-expected score of the same games, in percentage points: adj = 100 × (score − mean E).
  • Code. outpost.database.add_rating_cols(df) → adj_white; outpost.tilt.add_residuals; scout.line_stats.
  • Introduced. Chapter 2, Chapter 5, Chapter 6, Chapter 31.
  • Worked number. Chapter 21: OTB, White scores 46.5% with the Alapin and 50.8% in the Open Sicilian, but against expectation the two are +2.63 ± 1.04 and +2.90 ± 0.42 — the raw gap was who plays the Alapin, not the opening.
  • Pitfalls. It removes the rating gap but not the rating level (a 2400 vs 2400 game and a 1200 vs 1200 game both have E = 0.5); stratify by band as well. Because Elo over-predicts favourites, groups with large rating gaps have negative residuals by construction — compare like with like, or judge against a player's own average (D.6).

Calibration table, fitted scale, White's edge

  • Definition. Calibration: group games by rating gap (favourite's view) and compare the mean expected score with the actual score. Fitted scale: the number that replaces 400 in the logistic formula to fit a pool best (maximum likelihood, draws = half a win). White's edge in Elo: the constant added to White's rating that makes the mean expectation match White's actual score.
  • Code. outpost.ratings.calibration_table, fit_scale, log_loss, brier.
  • Introduced. Chapter 30.
  • Worked numbers. Best-fitting scale ≈ 478 for FIDE classical games and 670–750 for Lichess (not 400). White's first-move edge ≈ +31.8 ± 1.6 FIDE points in OTB classical; Lichess blitz +12.5 ± 0.5 (Glicko points).
  • Pitfalls. The fitted scale depends on how draws are treated: a logistic fit on decisive games only gives a steeper curve (Appendix E, E.9).

D.4 Position features

Mobility

  • Definition. The number of legal moves a side (or piece) would have if it were to move.
  • Code. st.mobility(board, color), st.mobility_by_piece(board, color); outpost.activity.mobility_by_square; outpost.planner.piece_mobility (N/B/R/Q only).
  • Introduced. Chapter 3.
  • Worked numbers. QGD Exchange after 10...Nf8: White 48, Black 31. Material-level middlegames: mobility difference vs stored evaluation r = 0.351 (OTB, n = 7,781) and 0.330 (Lichess).
  • Pitfalls. Legal moves count pinned pieces as immobile and every pawn push as mobility. Chapter 16's rook mobility counts pseudo-legal rook moves — a deliberate variant, stated there.

Activity % and activity score

  • Definition. A piece's activity % = 100 × mobility / its maximum on an empty board (N 8, B 13, R 14, Q 27). A side's activity score = mean activity % of its knights, bishops, rooks and queens; activity balance = White's minus Black's.
  • Code. outpost.activity.activity_score(board, color), activity_balance(board), piece_report(board, color).
  • Introduced. Chapter 3.
  • Worked number. Karpov–Unzicker 1974 after 24.Ba7: White 43.6, Black 31.2.
  • Pitfalls. A mean over pieces: one trapped piece and three free ones can average out to "fine".

Bishop quality (bad-bishop index)

  • Definition. The share of the side's pawns on the bishop's square colour (0–1). A pawn is fixed if an enemy pawn blocks it. Bad = index ≥ 0.6 and at least two fixed pawns on the bishop's colour; good = index ≤ 0.4; otherwise neutral.
  • Code. outpost.activity.bishop_quality(board, square); outpost.minor_endings.bishop_profile.
  • Introduced. Chapter 3; endgames in Chapter 17.
  • Worked number. Karpov's bishop on a7 (1974): 3 of 7 pawns on dark squares, 2 fixed, index 0.429 → neutral.
  • Pitfalls. Mainly an endgame effect in the data (good-vs-bad bishop: +7.2 rating-adjusted points OTB in endgames).

Outpost

  • Definition. A square in the enemy half (White's ranks 5–7, Black's 4–2), defended by an own pawn, that no enemy pawn can ever attack.
  • Code. st.outposts(board, color), st.occupied_outposts(board, color); outpost.space.outpost_holes.
  • Introduced. Chapter 3.
  • Worked number. Exchange down with an outposted minor piece: 40.3% OTB (n = 314) vs 24.8% without.
  • Pitfalls. A bishop-guarded square is not an outpost by this rule (Kasparov's famous d3 knight in 1985 g16 is not one). "A knight on an outpost is worth a rook" is a heuristic, not a data fact.

Space count

  • Definition. For one side: squares on files c–f of its own ranks 2–4 that are not attacked by an enemy pawn and not occupied by its own pawn, plus squares on files c–f of the enemy half (relative ranks 5–6) attacked by its own pawns. Space difference = White − Black.
  • Code. st.space(board, color); outpost.space.space_count, space_report, space_profile(game).
  • Introduced. Chapter 5.
  • Worked numbers. QGD Exchange after 10...Nf8: 9–9. Karpov–Unzicker after 24.Ba7: 10–8. One unit of space ≈ 5.1 cp in closed centres vs 1.2 cp in open ones (near-level OTB middlegames).
  • Pitfalls. Weakly related to the evaluation overall (r ≈ 0.1); it matters in closed centres. Only relative ranks 2–6 count.

Control and control map

  • Definition. For a square: White attackers − Black attackers (direct attacks; pinned pieces count; x-rays do not).
  • Code. boards.control_map(board), boards.draw_control_map(board); outpost.space.square_control, center_control.
  • Introduced. Chapter 5.
  • Worked number. QGD Exchange after 10...Nf8: e5 +2, c5 0, d5 −2.
  • Pitfalls. Counts attackers, not their value: a pawn and a queen count the same.

Centre type

  • Definition. From the c–f pawns, checked in order: closed (≥ 2 locked pawn pairs on c–f, one on d or e), fixed (exactly one locked pair on d/e), mobile (one side has d- and e-pawns, the other none on d/e), open (≤ 1 pawn on the d- and e-files together), fluid (everything else).
  • Code. outpost.space.center_type(board); outpost.opening_report.centre_type.
  • Introduced. Chapter 5.
  • Worked number. Karpov–Unzicker after 24.Ba7 (d5/e4 vs d6/e5 chain): closed.

Hole and weak colour complex

  • Definition. A hole: a square on the side's own relative rank 3 or 4 that none of its pawns can ever attack again (no own pawn on an adjacent file behind it). Weak colour complex: at least three holes of one colour and no own bishop of that colour.
  • Code. outpost.space.holes(board, color), colour_complex(board, color).
  • Introduced. Chapter 5.
  • Worked number. Black's holes in Karpov–Unzicker after 24.Ba7: a5, b5, d5, a6, b6, c6, d6, f6, h6.
  • Pitfalls. Holes correlate with the evaluation (r = 0.174 OTB) only because they come with material differences; with material level the correlation drops to 0.006 — the book's standard confounding example (Appendix E, E.6).

Pawn features

  • Definition (structures.pawn_features). Isolated: no friendly pawn on an adjacent file. Doubled: extra pawns on a file. Passed: no enemy pawn ahead on its own or an adjacent file. Backward: not isolated, every friendly pawn on adjacent files is strictly ahead of it, and its stop square is attacked by an enemy pawn. Islands: groups of adjacent files containing own pawns.
  • Code. st.pawn_features(board); outpost.structure.pawn_squares(board, color); game_features.pf30_*.
  • Introduced. Chapter 2.
  • Worked numbers. Engine worth in win-% points (equal material; middlegame / endgame): passed +4.1 / +6.1, isolated −0.6 / −1.4, backward −2.4 / −1.6.
  • Pitfalls. Counts at ply 30 are not controlled for material: an extra pawn is often a passed pawn.

Structure labels

  • Definition. Deterministic pawn-only rules: IQP, Hanging, Carlsbad, Maroczy, Hedgehog, FrenchChain, KIDChain, OpenSicilian, Stonewall, SlavTriangle, each with an owner (Appendix B, B.16).
  • Code. st.classify_structure(board); game_features.struct_20/30/40.
  • Introduced. Chapter 2.
  • Pitfalls. OpenSicilian:black mostly fires in Queen's Gambit, Catalan and English positions after ...dxc4 — only 0.9% of broadcast games with that label at ply 20 have a Sicilian ECO code. Labels are transient: about 80% of ply-40 IQPs were not present at ply 20.

Weakness count and weakness coefficient

  • Definition. Weakness count (descriptive): isolated + backward + doubled pawns + (islands − 1). Weakness coefficient: the coefficient of a pawn feature (White − Black) in a weighted least-squares regression of White's win % on all features in equal-material positions.
  • Code. outpost.structure.weakness_score(rep, color); Chapter 2 script 07_weakness_vs_eval.py.
  • Introduced. Chapter 2.
  • Pitfalls. Single features correlate weakly with the evaluation (|r| ≤ 0.075); the regression isolates small average effects that a single position can easily override.

King shelter (two versions)

  • Definition. Toolkit shelter (0–3): files among king file ± 1 with an own pawn one or two squares in front of the king. Chapter 4's shelter points (0–6): per file, 2 for a pawn on the king's next rank, 1 one rank further, 0 otherwise.
  • Code. st.king_shelter(board, color); outpost.king_safety.shelter_score(board, color).
  • Introduced. Chapter 4.
  • Worked number. Black after 24.Ba7 in Karpov–Unzicker: 5 points (f and h pawns home, g-pawn advanced to g6).
  • Pitfalls. Shelter tracks the evaluation poorly (Spearman +0.047 OTB); attackers aimed at the king track it far better.

King zone, attack weight, defenders

  • Definition. King zone: the king's square, its neighbours, and the three squares two ranks in front. Attack weight: sum over enemy N/B (2), R (3), Q (5) that attack at least one zone square (no x-rays). Defenders: own N/B/R/Q covering a zone square. Chapter 8's planner uses a simpler "king-zone attacks" count and the style module a "king pressure" count (D.7).
  • Code. outpost.king_safety.king_zone, zone_pressure(board, color), king_safety_report.
  • Introduced. Chapter 4.
  • Worked numbers. Black's king after 24.Ba7 (1974): one attacker (Qd2), weight 5, three defenders. Attack weight vs owner evaluation: Spearman −0.144 OTB.

Greek-gift preconditions and storm arrival

  • Definition. Greek gift (data): a bishop captures on h7 (h2) with check, the enemy king on g8 (g1), Kxh7 legal; outcome by the evaluation after the sacrifice (≥ +2.00 winning, ≤ −1.00 refuted). Five preconditions are scored by greek_gift_check. Storm arrival: after opposite-side castling, the first ply on which a side has a pawn on its own 5th rank or beyond on a file around the enemy king.
  • Code. outpost.king_safety.greek_gift_check(board), castling_timeline(game).
  • Introduced. Chapter 4.
  • Worked numbers. 0–1 preconditions → refuted 50.1% (n = 816); 4–5 → winning 61.6% (n = 588). First stormer scores 56.0% OTB, +3.7 against expectation (n = 24,905).

Development count, lead, tempo spend

  • Definition. Development count: own knights and bishops off the back rank, + 1 if castled. Lead = White − Black (measured at ply 24 in the data). Tempo spend (first ten moves): free repeats + early-queen moves + flank-pawn (a/b/g/h) moves + king walks.
  • Code. outpost.dynamics.development_count, development_lead; outpost.opening_principles.audit_game, development_count, side_summary.
  • Introduced. Chapter 12, Chapter 19.
  • Worked number. A development lead ≥ 2 at move 12 is worth +6.5 points above expectation in Lichess games below 1200 but +2.7 at 2400+.

Tempo value (pass test)

  • Definition. The evaluation of a position with the side to move minus the same position with the turn flipped (en-passant square cleared): what one move is worth.
  • Code. two calls to en.evaluate; outpost.prophylaxis.zugzwang_test uses the same idea.
  • Introduced. Chapter 19.
  • Worked number. Starting position at depth 20: White to move +0.30, Black to move −0.34 → a tempo is worth 0.64 pawns.
s = en.evaluate(chess.STARTING_FEN, depth=20)
flip = chess.Board()
flip.turn = chess.BLACK
f = en.evaluate(flip.fen(), depth=20)
print(f"tempo = {(s['cp'] - f['cp']) / 100:.2f} pawns")

The planning checklist (z and lean)

  • Definition. For each factor (material, activity, structure, king safety, space, development): White − Black difference divided by a scale (the factor's standard deviation in real positions) = z; a factor favours a side when |z| ≥ 0.5. Lean = number of factors favouring White minus those favouring Black; critical imbalance = the factor with the largest |z|. Persistence = share of games whose critical imbalance (factor and side) is the same ten moves later.
  • Code. outpost.planner.factor_table(board), checklist_lean(table), critical_imbalance(table), SCALES, VERDICT_Z = 0.5.
  • Introduced. Chapter 8.
  • Worked numbers. Karpov–Unzicker after 24.Ba7:

text factor step white black diff z verdict 0 material 1. Material 38 38 0 0.00 level 1 activity 2. Piece activity 40 27 13 1.04 White 2 structure 3. Pawn structure 1 weak / 0 passed 2 weak / 0 passed 1 0.62 White 3 king_safety 4. King safety 0 hits on zone 0 hits on zone 0 0.00 level 4 space 5. Space 10 8 2 0.56 White

The five-count checklist explains R² 0.39 (OTB) to 0.49 (Lichess) of stored engine evaluations.

Safe mobility and restricted pieces

  • Definition. Legal N/B/R/Q moves to squares not attacked by an enemy pawn, not attacked by a cheaper enemy piece, and not attacked-and-undefended. A restricted piece has at most one safe move.
  • Code. outpost.prophylaxis.safe_mobility(board, color), restricted_pieces(board, color).
  • Introduced. Chapter 7.
  • Worked number. Karpov–Unzicker after 24.Ba7: White 25, Black 9.

Ignored threat and prophylactic move

  • Definition. Ignored threat: after the move played, the null-move threat move is still Stockfish's best reply. Prophylactic move (operational): threat ≥ 10, the move played is quiet, loses < 5 win-% points, and the threat move is no longer the best reply.
  • Code. outpost.prophylaxis.scan_game(game, depth=16), plan_penalty(...).
  • Introduced. Chapter 7.
  • Worked numbers. Quiet threats ignored 26.8% on Lichess vs 12.1% OTB classical; an ignored threat became a mistake or blunder 51.6% of the time vs 18.6% when handled.

Zugzwang test

  • Definition. The mover's win % after its best real move minus its win % if it could pass; a positive gap means passing would be better — a zugzwang-like position.
  • Code. outpost.prophylaxis.zugzwang_test(board, depth=18).
  • Introduced. Chapter 7.
  • Pitfalls. "Strict" zugzwang needs every move to be worse than a pass; Sämisch–Nimzowitsch 1923's final position fails that test by Stockfish 19 (21 of 27 moves worse than a pass, not all).

Forcing moves and the threat rule

  • Definition. Checks, then captures and promotions (ordered by most valuable victim, least valuable attacker), then threats: quiet moves that create a new capturable target (a non-pawn, non-king piece undefended or worth more than its cheapest attacker) or a mate-in-one threat.
  • Code. outpost.calc.forcing_moves(board), kind_counts(board), is_threat(board, move).
  • Introduced. Chapter 10.
  • Worked numbers. Black to move after 24.Ba7 (1974): 32 legal moves, 4 captures, 3 threats, 0 checks — 7 forcing. Middlegames have about 34–36 legal moves but about 6 forcing ones.

Tactical motifs (operational definitions)

  • Definition. Worthwhile target: the king, a piece worth more than the attacker, or an undefended piece (pawns never). Fork: one piece attacks two worthwhile targets from a safe square. Pin / skewer: a line piece attacks a non-pawn piece with a more valuable (pin) or less valuable (skewer) piece behind it. Discovered attack: a line piece attacks a worthwhile target through the square a moving piece vacated. Overloaded: the only defender of two or more attacked pieces. Punished blunder: the blunderer is still ≥ 10 win-% points worse after the opponent's next move.
  • Code. outpost.tactics.scan(board), find_forks/find_pins/find_skewers/find_discovered/find_overloaded, move_motifs(board, move), scan_game(...).
  • Introduced. Chapter 9.
  • Worked number. In 9,600 analysed Lichess blitz games, only 10.7% of blunders were punished by a named-motif move; 44.7% by a plain capture.

Sacrifice and its verdict

  • Definition. Detected sacrifice: the opponent's next move captures on the arrival square, the mover is ≥ 2 points down after it, and the mover's next move does not restore the balance. Verdict from the sacrificer's win-% drop against the best move: sound < 5, speculative 5–15, unsound ≥ 15. Material-giving move (style): a move after which the player's material balance is ≥ 2 points lower both 2 and 4 plies later.
  • Code. outpost.sacrifices.find_sacrifices(game), verdict(eval_before, eval_after, side), judge(...); outpost.style.game_features(...)["give100"].
  • Introduced. Chapter 6 (Greek-gift verdicts), Chapter 11.
  • Worked numbers. Sound share of sacrifices from level positions: 8.2% (Lichess < 1000) → 87.2% (OTB 2400+). The Opera Game: one material-giving move by Morphy in 17 (5.9 per 100 own moves).
  • Pitfalls. The detector includes blunders and misses gambits and declined sacrifices.

Attack conditions, stable −2 and compensation episodes

  • Definition. Attack conditions (0–4): development lead ≥ 2; zone attackers − defenders ≥ 2; an open or half-open file (or clear diagonal) next to the king; weak shelter (≤ 3 of 6 points, or king uncastled with queens on). Stable −2: own evaluation ≤ −2.00 on four consecutive plies; saved = drew or won. Compensation episode: from ply 16, ≥ 2 points of material down on four plies while the own evaluation stays ≥ −1.00.
  • Code. outpost.dynamics.attack_conditions(board, attacker), trailing_episode(evals), compensation_episode(evals, materials).
  • Introduced. Chapter 12.
  • Worked number. The stable −2 side drew or won 31.4% of Lichess blitz games below 1200, 24.6% at 2400+.

Endgame metrics: conversion, opposition, key squares, rule of the square, rook activity

  • Definition. Conversion: the score (or win rate) of the side ahead from the endgame start, by signature, pawns up, band and pool. Opposition: kings with even file and rank distance; the side not to move holds it. Key squares: squares whose occupation by the attacker's king wins regardless of the defender (textbook rule and an exact tablebase-derived version). Rule of the square: the defending king catches a lone passed pawn if its distance to the queening square ≤ the pawn's moves (+1 if the defender moves first). Rook activity: pseudo-legal rook mobility, rook on the 7th, rook behind a passer; king centrality = 4 − Chebyshev distance to the nearest centre square.
  • Code. outpost.endgame_stats.conversion_table, lookup; outpost.pawn_endings.opposition, key_squares, derived_key_squares, in_square; outpost.rook_endings.rook_activity; cd.tablebase(fen) for truth.
  • Introduced. Chapter 14, Chapter 15, Chapter 16, Chapter 18.
  • Worked numbers. Exactly one pawn up with equal pieces at the endgame start: OTB classical FIDE 2400+ win 46.1%, draw 45.2% (n = 3,456); Lichess 1200–1399 blitz win 53.5% (n = 3,693). Strong players win less often but lose far less.
  • Pitfalls. Practical conversion is not theoretical value — a "won" position can be a tablebase draw. Tablebase "cursed wins" are draws under the 50-move rule.

D.5 Clock and practical play

Time spent and clock fraction

  • Definition. Time spent on a move = previous clock of the mover − clock after the move + increment (floored at 0); each side's first move is skipped online (clocks start after it). Remaining-clock fraction = clock before the move / base time.
  • Code. outpost.clock.add_time_spent(plies, base, inc, first_move_free=True), analyse_clock(movetext); outpost.review.add_time_spent.
  • Introduced. Chapter 13.
  • Pitfalls. OTB: infer base and increment from the clocks (header_tc=None, first_move_free=False), because broadcast TimeControl tags are unreliable and base_s usually includes the first increment (Appendix B, B.5).

Time trouble

  • Definition. Online: the mover's clock falls below 10% of the base time. OTB classical: below 5 minutes after one of moves 1–39.
  • Code. outpost.clock.time_trouble(plies, base, frac=0.10, seconds=None, before_move=None).
  • Introduced. Chapter 13.
  • Worked number. OTB classical middlegame blunders rise from 1.81 to 5.40 per 100 moves as the clock runs low.

Time on critical moments, snap moves

  • Definition. Time ratio on a critical moment: time spent on that move / the mover's median time per move in the game. Snap move: a middlegame move made in ≤ 2 seconds while the mover still has ≥ 50% of the base time.
  • Code. outpost.clock.time_on_critical(plies); outpost.style.time_features(...).
  • Introduced. Chapter 13, Chapter 36.

Opening time and clock lead (OTB)

  • Definition. Opening time: minutes spent on own moves 2–15. Clock lead at move 20: own clock − opponent's clock after both have played move 20.
  • Introduced. Chapter 27.

Flag in a winning position

  • Definition. A decisive game ending Time forfeit (analysed Lichess games) where the flagged player's last evaluation was ≥ +3.00 or win % ≥ 80.
  • Introduced. Chapter 36.
  • Worked number. Of analysed games lost on time, the flagged player was ≥ +3.00 in the final position in 34.1% of bullet and 21.8% of blitz flag losses.
  • Pitfalls. Analysed games are self-selected — painful losses are more often analysed.

Lost, winning, saved

  • Definition. A player was lost if their own win % fell to ≤ 10 at some point (≈ −3.5 pawns), winning if it reached ≥ 90; saved = the lost player still drew or won.
  • Introduced. Chapter 28.
  • Worked number. In decisive Lichess bullet games, the eventual winner was "lost" (≤ 10%) at some point in 33.7%.

Session, residual and tilt effect

  • Definition. Session: consecutive games at one speed starting at most 2 × (base + 40 × inc) + 30 min apart. Residual = 100 × (score − expected), with the player's median rating in the window. Tilt effect = mean residual after a loss − mean residual after a win (next game in the same session), corrected by subtracting a within-session permutation null. Pause = time from the end of one game to the start of the next.
  • Code. outpost.tilt.add_sessions, add_residuals, tilt_effect(P, reps=10), stop_loss_rule(...).
  • Introduced. Chapter 28.
  • Worked numbers. Lichess blitz: corrected −1.84 [−1.96, −1.71] points pooled; −2.81 within player. Small: about one extra half-point lost every 18–27 games.
  • Pitfalls. The naive within-player comparison is biased by the finite-sequence effect (observed +7.57 before correction) — the permutation null fixes it (Appendix E).

D.6 Openings, opponents and training

Database expectation and the verdict

  • Definition. Database expectation: the score of players at your level (same speed, colour and rating range, your own games removed) from the same position. Verdict: above / below only when the 95% interval excludes the expectation (a two-sample difference interval when the reference is thin), otherwise cannot tell.
  • Code. outpost.repertoire.verdict(points, n, expected, expected_n=None), compare(...), wilson_interval(points, n).
  • Introduced. Chapter 20.
  • Worked numbers. 🎭 Dev's composite Italian: 54 points from 80 games = 67.5% [56.6–76.8] vs 51.6% for his band — above. His Najdorf 6.Be3: 18 from 50 = 36.0% [24.1–49.9] vs 44.3% — cannot tell.

🎭 Composite data: Dev's games are real Lichess games played by anonymous players at his rating, assembled into one "player" so we can demonstrate the method on your own games.

Shrinkage and study priority

  • Definition. Shrinkage: pull a small-sample score towards the database expectation with a prior "worth K games": (points + K · prior) / (n + K), K = 30. Study priority = reach (share of your games reaching the node) × max(0, database expectation − shrunk score).
  • Code. outpost.repertoire.shrink(points, n, prior_score, prior_games=30), study_priorities(...).
  • Introduced. Chapter 20.
  • Worked number. Dev's Najdorf, 18 / 50 shrunk towards 44.3% with K = 30: 39.1%.

Coverage and prep load

  • Definition. Coverage: with k prepared replies at each opponent node, the share of reference games still inside your prepared tree at each ply. Prep load: replies needed to reach ≥ 80% coverage at every node to ply 10.
  • Code. outpost.repertoire.coverage(...), prep_load(...).
  • Introduced. Chapter 20.
  • Worked number. With two prepared replies per node, only 19.3% of games stay in the tree at ply 10.

Book exit, move cost, must-know score

  • Definition. Book exit ply: the first ply at which a game leaves the "book" (move sequences played ≥ 5 times in PGN Mentor games from 1990). Move cost: win-% loss of a move against the engine's best (multi-PV). Must-know score of a node = reach × error rate (share of moves costing ≥ 10 points) × mean error cost.
  • Code. outpost.prep.book_exit(...), move_cost(board, san, depth), must_know(book, root, ...), prep_node(...).
  • Introduced. Chapter 23.
  • Worked numbers. Median book exit ply 4–8 on Lichess, 7–12 OTB; the first off-book move costs 5.2 win-% points below 1000 vs 2.1 at 2400+.

Practical residual

  • Definition. White's actual score from an opening position minus the score implied by the engine evaluation through the win-% model.
  • Introduced. Chapter 23.
  • Worked number. The Stafford Gambit after 4...dxc6 is +2.11 (Stockfish 19, depth 20), yet club White scores 48.3% (n = 406). Across 331 common club positions, engine evaluation vs White's score r = 0.09.

Predictability and the own-average comparison (scouting)

  • Definition. Predictability: share of the most common choice and the Shannon entropy (bits) of the choice distribution. Own-average comparison: a line is a strength or weakness only if its 95% interval excludes the Elo-expected score plus the player's own overall residual — not the raw expectation.
  • Code. outpost.scout.predictability(choices), line_stats(d), verdict(row, min_n=10, baseline=...).
  • Introduced. Chapter 24.
  • Worked numbers. A player who chooses the French in 129 of 135 games (plus two other defences): top share 0.956, entropy 0.30 bits. Judged against raw expectation, Hikaru Nakamura's lines against 1.e4 would all look like "weaknesses" (overall he scores 83.1% vs 83.4% expected over 45,935 Chess.com blitz games), because Elo over-predicts favourites.

Decided-in-phase, puzzle window, weakness z

  • Definition. Decided in phase: the phase of the position before the decisive ply (time forfeits separate). Puzzle window: puzzle ratings with an expected solve rate between 60% and 80% under the Elo formula. Weakness z for an indicator: (your value − peers' value) / √(SE_you² + SE_peers²), positive = worse than peers.
  • Code. outpost.training.puzzle_window(puzzle_rating, lo=0.6, hi=0.8), weakness_profile(player, reference); outpost.coach.puzzle_window.
  • Introduced. Chapter 25, Chapter 38.
  • Worked number. A 1400 puzzle solver: window 1159–1330.

Error types

  • Definition. For every blunder, the first rule that applies: allowed a mate; left a piece en prise; walked into a tactic; failed to punish; endgame conversion error; otherwise other. (Chapter 26's engine-based version classifies with two searches: hung material, missed chance, allowed tactic, quiet punishment.)
  • Code. outpost.coach.classify_error(...); outpost.review.error_type(fen_before, san_played, depth=14).
  • Introduced. Chapter 26, Chapter 38.

D.7 Style and progress

Sharpness

  • Definition. Mean |change in White's win %| per ply over moves 10–40, both sides' moves, averaged per game then over games.
  • Code. outpost.style.eval_features(plies, color)["sharp"].
  • Introduced. Chapter 33; champions' values in data/reference/style_players.csv.
  • Worked numbers. Tal 2.34 vs Petrosian 1.84 (Stockfish 19, depth 16, 40-game samples). The Opera Game's moves 10–40 (here only plies 20–33 exist): 0.95.
  • Pitfalls. Depends on depth, the window and the opponents; a sharp game needs two players.

Material-giving moves, tension, king pressure

  • Definition. Material-giving per 100 own moves (D.4, sacrifice). Tension: mean number of attacker→target pairs between opposing pieces (kings never targets) after the player's moves, moves 10–40. King pressure: mean number of the player's pieces (pawns included, king excluded) attacking the enemy king zone.
  • Code. outpost.style.game_features(text, color), tension(board), king_pressure(board, color).
  • Introduced. Chapter 33.
  • Worked numbers. Morphy in the Opera Game: give100 5.9, tension 5.6, king pressure 2.4. Tal 1.48 material-giving moves per 100 vs Petrosian 0.92 and Karpov 0.90.
style.eval_features white (moves 10-40): {'sharp': 0.9537563244248778, 'acpl': 7.125}
style.game_features white: {'plies': 33, 'own_moves': 17, 'give_plies': [25], 'give100': 5.882352941176471, 'tension': 5.625, 'kpress': 2.375, 'opp_castle': 0.0, 'endgame': 0.0, 'qoff20': 0.0, 'draw': 0.0}

Style space and its validation

  • Definition. Standardise player-level features → principal components → k-means clusters; validate with the silhouette against structure-free null data, seed stability (adjusted Rand index) and split-half reliability.
  • Code. outpost.style.fit_style_space, silhouette_vs_null, seed_stability, bootstrap_coassignment, split_half_reliability.
  • Introduced. Chapter 33; statistics in Appendix E, E.10.
  • Pitfalls. Clusters always appear; whether they are types is a separate question — in the book's data, silhouettes never beat a Gaussian null.

Improvement rate, monthly performance, plateau

  • Definition. Improvement rate: Theil–Sen slope of the monthly median rating over active months (gaps count as elapsed time), per month and per 100 games. Monthly performance: the iterative performance rating of a month's games. Plateau: a piecewise-linear segment (≥ 6 months) whose whole 95% slope interval lies within ±2 points per month; climb / decline if above +2 / below −2.
  • Code. outpost.progress.monthly, improvement_rate, changepoints, segment, false_alarm_rate.
  • Introduced. Chapter 35.
  • Pitfalls. Change-point detectors fire on noise; run them on performance, not the rating level, and check a flat-player simulation with your own game volume (Chapter 35 found 76% false alarms on the rating level for flat 30-game-a-month players).

D.8 One-page summary of the canonical definitions

Metric Definition Code
Evaluation Stockfish 19, White's view, pawns, depth stated; clip ±10 pawns, mate = ±10 en.evaluate
Win % 50 + 50·(2/(1+e^(−0.00368208·cp)) − 1) cd.win_pct
CPL / ACPL max(0, before − after), mover's view / mean cd.cpl, cd.acpl
Move accuracy 103.1668·e^(−0.04354·Δwin%) − 3.1669, clipped 0–100 cd.move_accuracy
Game accuracy arithmetic mean of move accuracies (not Lichess's display, not CAPS) cd.game_accuracy
Inaccuracy / mistake / blunder win-% drop ≥ 5 / 10 / 15 (cp alternative 50/100/300 only in Chapter 32) cd.classify_move
Critical moment one ply moving White's win % by ≥ 15 outpost.clock.count_critical
Phase endgame if non-pawn material ≤ 26; else opening if ply ≤ 20; else middlegame cd.phase_of
Pure endgame endgame with no queens cd.is_pure_endgame
Rating band / balanced 200-pt bands of the average rating / |diff| ≤ 100 cd.rating_bands
Speed (Lichess) base + 40·inc: < 29 / < 179 / < 479 / < 1499 / ≥ 1500 s cd.speed_from_tc
Expected score 1/(1+10^((Rb−Ra)/400)) cd.expected_score
Score (wins + ½ draws)/games, named side cd.score
Rating-adjusted score 100 × (score − mean E) outpost.database.add_rating_cols
Performance rating iterative: Σ E(R, rᵢ) = score cd.performance_rating