Chapter 10 Exercises — Calculation
Difficulty: ⭐ concept check · ⭐⭐ position or small analysis · ⭐⭐⭐ data/code or judgement · ⭐⭐⭐⭐ open project.
Every position in Part B is a real Lichess puzzle (public puzzle IDs: lichess.org/training/<id>) drawn by a
fixed rule in code/08_exercise_positions.py. Every solution was replayed from the puzzle database and
checked with Stockfish 19 (MultiPV 2, depth 18); mates were also proved with outpost.calc.mate_search, and
the six-piece pawn ending with the Syzygy tablebase. Solve each position without moving the pieces, and
write down your forcing scan before you calculate.
Part A — Concepts ⭐
A1. Define calculation, candidate move, variation and calculation tree in one sentence each. How does calculation differ from evaluation?
Answer
Calculation is working out the concrete consequences of specific moves in your head; a candidate move is a move you decide to calculate; a variation is one sequence of moves; a calculation tree is the set of variations you examine, branching wherever more than one reply deserves attention. Evaluation judges a position as it stands; calculation produces positions that you then evaluate.
A2. State the book's rule for a threat. Give one kind of real threat the rule misses and one kind of "threat" it lists that is not really a threat.
Answer
A quiet move after which, if the opponent passed, the mover could mate in one or win material by a new capture of a piece (not a pawn or the king) that is undefended or worth more than its cheapest attacker. Misses: threats that work through a pin or an x-ray, threats against pawns (a pawn that is about to fall), and positional threats (a pawn break, a manoeuvre). Over-includes: attacks on a piece that can simply move away with tempo, or "attacks" on a defended piece by a cheaper piece that is itself pinned.
A3. In 2,000 real middlegame positions, the opponent had on average 3.4 legal replies after a check and about 37 after a capture. Explain why captures are still treated as forcing.
Answer
Because most legal replies to a capture lose material — the opponent "must" recapture. A capture limits the sensible replies, not the legal ones. A check limits the legal ones. That is why checks give the narrowest trees.
A4. What is the horizon effect? Give an example from this chapter where a shallow search approved a losing move.
Answer
The misjudgement that happens when a decisive event lies just beyond the search depth. Makhnev's 46.g6 (Makhnev–Grischuk, 2026) was Stockfish 19's own first choice at depths 1, 2, 3, 5 and 6; only from depth 10 did the engine see Black's checks coming first, and from depth 12 it saw a forced mate.
A5. Kotov's method asks you to list all candidate moves before calculating. Name one strength of that advice and one criticism of it as a description of how strong players think.
Answer
Strength: it stops you from falling in love with the first move you see and from forgetting a candidate. Criticism: strong players do not think so tidily — they revisit branches, find new candidates in the middle of a line, and let intuition dismiss most moves without calculation.
A6. True or false, with a reason: "If the forcing scan finds no check, capture or threat that works, the position has no good move."
Answer
False. The scan is an ordering, not a filter. Stockfish 19's best move was quiet in 64.3% of the sampled Lichess middlegame positions (depth 16), and in puzzles rated 2200+ about a quarter of solutions are not on the forcing list at all.
A7. What is the defender's forcing scan, and at which moment of a calculation must it be done?
Answer
Listing the opponent's checks, captures and threats in the position after your move (or at the end of any line you intend to play). It must be done at the end of every line before you trust its evaluation, and before you release the piece in the game.
A8. Why does outpost.calc.mate_search filter the attacker's moves but never the defender's?
Answer
Because a forced line must work against every defence. Restricting your own candidates only risks missing a win (the search says "no mate found with these moves"); restricting the opponent's replies risks "proving" a mate that does not exist. The same asymmetry applies to human calculation.
Part B — Positions ⭐⭐
B1. Find the tactic — mate in three. White to move. (Puzzle OKURd, rating 1629.) Black has just played ...Rxd7. List White's checks; there are eight. Which one starts the mate?

♟️ Position: White Kh1, Qe7, Rf5, a2, b2, c3, g2, h2; Black Kg8, Qb6, Rd7, Nf6, a6, b7, h7 — White to move. FEN:
6k1/1p1rQ2p/pq3n2/5R2/8/2P5/PP4PP/7K w - - 0 31
Answer
31.Rg5+! Kh8 32.Qf8+ Ng8 33.Qxg8# (the database solution; 33.Rxg8# also mates). Stockfish 19: #3
(depth 18); the best alternative, 31.Qe1, is −2.81. Rg5+ is only the eighth move in the forcing scan
(the queen checks come first), so finish the list. Note the defender's scan: the tempting capture
31.Rxf6?? allows mate in 3 for Black (31...Rd1+ 32.Qe1 Rxe1+ 33.Rf1 Rxf1#, #-3 at depth 18) because
White's back rank is weak. mate_search(checks, 3) proves the mate after 292 positions.
B2. Find the tactic — capture first. White to move. (Puzzle L2fAB, rating 1527.) Black's rooks on c5 and e5 are both attacked by the rook on d5. Why are they safe at the moment, and how does White change that?

♟️ Position: White Kh1, Qd7, Rd5, Rf1, a3, b6, e3, f2, g4, h3; Black Kg8, Qe7, Rc5, Re5, a6, b7, e4, f7, g6, g7 — White to move. FEN:
6k1/1p1Qqpp1/pP4p1/2rRr3/4p1P1/P3P2P/5P2/5R1K w - - 4 31
Answer
Black's queen on e7 defends both rooks — e5 along the file and c5 along the diagonal e7–d6–c5. It is an overloaded defender. 31.Qxe7! Rxe7 32.Rxc5 removes it and wins a whole rook: +7.33 (Stockfish 19, depth 18), against +1.05 for the second-best move 31.Rfd1. The three queen checks at the top of the scan (Qe8+, Qd8+, Qc8+) achieve nothing; the winning move is the fourth forcing move, the first capture.
B3. Endgame technique — the quiet move. Black to move. (Puzzle TE70m, rating 1791.) The forcing scan contains a single move, 66...Kxf5. Do you take?

♟️ Position: White Kb1, Rd3, a6, e5, f5; Black Kg4, Ba7, f7, h3 — Black to move. FEN:
8/b4p2/P7/4PP2/6k1/3R3p/8/1K6 b - - 0 66
Answer
No. 66...h2! 67.Rd1 Bg1! 68.a7 h1=Q. The bishop interferes with the rook's control of the first rank, and the h-pawn promotes. Stockfish 19: 66...h2 −5.89 (depth 18); 66...Kxf5? +4.57 — after 67.Rxh3 White's a-pawn decides. The quiet pawn push wins because the race is decided by who queens first and with what support, not by material count.
B4. Endgame technique — only move. White to move. (Puzzle OiKNX, rating 1680; 6 pieces — verified with the Syzygy tablebase.) There are seven legal moves and no forcing ones. Which wins?

♟️ Position: White Kf3, e4, g3; Black Kd4, e6, f7 — White to move. FEN:
8/5p2/4p3/8/3kP3/5KP1/8/8 w - - 5 51
Answer
51.Kf4! The tablebase says White wins (distance to mate 43) and that Kf4 is the only winning move; all six other moves (g4, e5, Ke2, Kf2, Kg2, Kg4) lose. The database line: 51...e5+ 52.Kf5 Ke3 53.g4 f6 54.Kxf6 Kxe4 55.g5 Kf4 56.g6 e4 57.g7 e3 58.g8=Q. White's king goes towards Black's pawns and wins the race to the kingside. With no forcing moves at all, calculation here is pure king-and-pawn counting — see Chapter 15 for the method.
B5. Find the tactic — the in-between move. Black to move. (Puzzle MEuaB, rating 1816.) White's queen on c2 and Black's queen on c7 face each other through the knight on c6.

♟️ Position: White Kg1, Qc2, Rb1, Rf1, Bb2, Be2, Ne5, Nf3, a3, d4, f2, g2, h2; Black Kg8, Qc7, Rb8, Rf8, Bd7, Be7, Nc6, Nd5, a6, e6, f7, g7, h7 — Black to move. FEN:
1r3rk1/2qbbppp/p1n1p3/3nN3/3P4/P4N2/1BQ1BPPP/1R3RK1 b - - 1 17
Answer
17...Nxe5! 18.Qxc7 Nxf3+! — the intermezzo: before recapturing the queen, Black captures again with check — 19.gxf3 Nxc7 (or 19.Bxf3 Nxc7), and Black is a piece up. Stockfish 19: 17...Nxe5 −6.85 (depth 18); the second-best move, 17...Be8, is only −0.20. The calculation trap is to stop after 18.Qxc7 and think "I have lost my queen". Always look for a check in the middle of an exchange.
B6. Endgame technique — don't check. Black to move. (Puzzle UxObL, rating 1502.) 56...c2+ looks natural. Is it?

♟️ Position: White Kb1, d4, f2, h6; Black Kd3, c3, d5, f6 — Black to move. FEN:
8/8/5p1P/3p4/3P4/2pk4/5P2/1K6 b - - 2 56
Answer
No. 56...Kd2! (quiet) 57.h7 c2+ 58.Ka2 c1=Q — Black's king supports the pawn from d2, so the check comes later with the promotion square guarded. Stockfish 19: 56...Kd2 −5.53 (depth 18). The "forcing" 56...c2+? is +8.42 after 57.Kc1, when the king blockades the pawn and the h-pawn queens; 56...Kxd4? is +7.22. A check that lets the defending king reach the blockade square is a bad check.
B7. Find the tactic — mate in four. White to move. (Puzzle MvlyT, rating 1786.) Black's queen and bishop have reached White's side of the board, but it is White to move. Find the forced mate.

♟️ Position: White Kh1, Qf1, Rd7, Ba2, a3, b2, e5, g2, h3; Black Kg8, Qe3, Rd8, Rf8, Bc2, a6, b5, e6, f7, g7, h7 — White to move. FEN:
3r1rk1/3R1ppp/p3p3/1p2P3/8/P3q2P/BPb3P1/5Q1K w - - 4 28
Answer
28.Qxf7+! Rxf7 29.Rxd8+ Rf8 30.Bxe6+ Kh8 31.Rxf8#. Stockfish 19: #4 (depth 18); the next-best move,
28.Rxd8 at once, is −9.33. The first move is a queen sacrifice with check and the first item in the
forcing scan; every White move in the line is a check or a capture, so mate_search(checks, 4) proves the
mate after only 30 positions. Calculation of this length is easy once you allow yourself to look at the
queen sacrifice — the obstacle is psychological, not computational.
B8. Analyze this position — a long line. White to move. (Puzzle L4x9n, rating 1927.) Calculate 41.Nxe4 Qxe4 and then find the follow-up. What should Black do instead of 41...Qxe4?

♟️ Position: White Kh2, Rb7, Nd2, Nd5, f2, g2, h3; Black Kh6, Qa4, Ne4, a5, e5, f6, g5, g6 — White to move. FEN:
8/1R6/5ppk/p2Np1p1/q3n3/7P/3N1PPK/8 w - - 2 41
Answer
Database solution: 41.Nxe4! Qxe4 42.Rh7+!! Kxh7 43.Nxf6+ Kh6 44.Nxe4 — the rook sacrifice drags the king to h7 (attraction) so that Nxf6+ forks king and queen. Stockfish 19 gives 41.Nxe4 +5.02 (depth 18), against −4.14 for the second-best 41.Nf1. The engine's main line shows Black's best defence is not to recapture: 41...g4 (+5.02), staying a piece down rather than walking into the fork. A good calculator finds both: the combination after the natural recapture, and the fact that the opponent has a better reply than the one you hoped for.
Part C — Data & Code ⭐⭐–⭐⭐⭐
C1. Database research — forcing moves by band (⭐⭐). Extend code/01_branching.py: for Lichess
middlegame positions, report the weighted mean of checks, captures and threats separately for each
200-point band, with the number of positions per band. Use at least 300 positions per band (sample by
rating_band). Expected output: a table with 9 rows (bands) × 5 columns (n, legal, checks, captures,
threats). Question: do weaker players reach positions with more forcing options? (In the chapter's
smaller sample the forcing count wandered between 4.9 and 7.3 with no trend — does that hold?)
C2. Engine analysis — the scan rank of the engine's move (⭐⭐⭐). Take 300 Lichess middlegame positions
with evaluations and ask Stockfish 19 (depth 16) for its best move. Record the move's kind
(calc.move_kind) and its rank in calc.forcing_moves. Expected output: the share of engine best moves
that are checks / captures / threats / quiet, and the distribution of scan ranks for the forcing ones.
Compare with the quiet-move figure used in the chapter (best move quiet in 64.3% of sampled Lichess
middlegames at depth 16) and explain any difference (your threat rule turns some "quiet" moves into
"threats").
C3. Database research — missed mates by clock (⭐⭐⭐). Modify code/03_missed_mates.py to record, for
each first mate opportunity, the mover's remaining clock before the move (from [%clk], as a fraction
of the base time). Expected output: kept-mate rate in bins of remaining time (<10%, 10–25%, 25–50%,
50% of base) for Lichess blitz and rapid separately, with Wilson intervals. Question: how much of the gap between OTB classical (about 90% at mate in 1–2) and Lichess (74–79%) is explained by time?
C4. Code — checks-only mate solver on longer mates (⭐⭐⭐). Run calc.mate_search with mode="checks"
on 300 mateIn4 and 300 mateIn5 puzzles (use a node limit of 300,000). Expected output: solved %,
median nodes, and the first-move kinds of the unsolved ones. Does the share of mates solvable by checks
alone keep falling with length (99.3% at mate in 2, 96.6% at mate in 3 in the chapter)?
C5. Engine analysis — your own horizon chart (⭐⭐⭐). Choose three positions from your own games where
you made a decisive mistake. Use the structure of code/07_depth.py to plot the evaluation after your
move at depths 1–22. Expected output: one chart and, for each position, the depth from which the
verdict settles. Question: was your mistake refuted by a forcing reply (settles early, like 36...Rg5)
or by a long line (settles late, like 48.Kf4)?
C6. Code — a threat rule with exchanges (⭐⭐⭐). calc.is_threat ignores exchange sequences. Implement
a simple static exchange evaluation (SEE) for the target square and count a threat only if SEE > 0.
Expected output: re-run kind_counts on 1,000 middlegame positions with both rules; report the mean
number of threats under each. Which rule puts more puzzle solutions in the first three scan positions?
Part D — Judgment & Transfer ⭐⭐⭐
D1. A 1200-rated player and a 2000-rated player face the same position with a mate in three. Using the chapter's data (Lichess first-opportunity rates and the puzzle-scan table), describe what is likely to be different in how they approach the position — not just how often they succeed.
Answer (sketch)
Lichess players under 1400 kept a mate in 3 65.1% of the time, 1800–2199 players 76.4%. The puzzle data suggests the difference lies in the scan: for low-rated puzzles the solution is usually the first forcing move (69.2% for puzzles under 1000), so beginners' puzzles train "first check works"; stronger players are used to going down the list and to considering the defender's best reply. The 2000 is also more likely to check the opponent's forcing replies at the end of the line, and to hold the position in mind for three moves without losing a piece's location.
D2. Stockfish rated Fischer's windmill move order slightly differently from Fischer. When is it right to play the engine's second choice in a game?
Answer (sketch)
When the evaluations are practically equal (here all between −6.68 and −7.32) and the human's line is easier to calculate safely — e.g. every move a check — so the risk of a calculation error is lower. A small loss in engine evaluation can buy a large gain in certainty.
D3. Carlsen had about 20 seconds per move when he played 48.Kf4. Construct a five-second procedure a player in time trouble could use in positions with very few legal moves.
Answer (sketch)
For each legal move (here three), ask only: "Which checks does the opponent have next, and where does my king go after them?" Prefer the move that keeps the king close to its defenders and away from the corner or the edge. With three candidates and a handful of checks each, this is a tree of a few dozen positions that you do not need to search deeply — you need to see the direction the king is being driven.
D4. The engine's best move is quiet in about two-thirds of middlegame positions, but the forcing scan lists checks, captures and threats first. Is the advice "checks, captures, threats" wrong? Argue both sides.
Answer (sketch)
For: most positions are not tactical, so the best move is usually a quiet one; a player who only scans forcing moves will rarely find it. Against: the scan is about order, not about where good moves are — forcing moves are few, cheap to calculate and contain most of the decisive tactics (and most blunders). Doing them first and fast leaves time for the quiet candidates. The advice is right as a procedure and wrong as a filter.
D5. OTB classical players kept a forced mate in one or two about 90–91% of the time; Lichess players of every band, 69–82%. A coach concludes: "Online chess makes you worse at calculation." What else could explain the gap, and what data would you need to separate the explanations?
Answer (sketch)
The populations differ (FIDE-rated tournament players vs a broad online population), the clocks differ (an hour or more vs a few minutes; premoves and mouse-slips exist only online), and the Lichess games are self-selected analysed games while the OTB evaluations come from relay engines. To separate them you would need the same players in both settings (rare in our data), or within-setting comparisons: Lichess classical vs blitz at the same rating (73.7% vs 68.1% in the chapter's sample suggests the clock matters), and OTB classical vs OTB blitz at the same FIDE rating. The data supports "time to calculate matters"; it does not show that online play damages calculation.
Part M — Mixed / Interleaved ⭐⭐–⭐⭐⭐
M1 (with Chapter 4, King Safety). In Byrne–Fischer and Polgar–Mamedyarov, list the king-safety features (Chapter 4) that made a forcing attack likely before the first sacrifice. Which feature was common to both?
Answer
Byrne: king in the centre, castling rights lost after 16...Rfe8+, the e-file open, Black's lead in activity. Mamedyarov: king still on e8, f7 guarded only by the king, the e-file half-open with White's pawn on e5. Common feature: an uncastled king in the centre with an open or half-open e-file.
M2 (with Chapter 7, Prophylaxis). Chapter 7's threat finder asks what the opponent would play if you passed. This chapter's threat rule asks what you would play if the opponent passed. Apply both questions to the Gukesh position before 36...Rg5. What would each have told Black?
Answer
This chapter's question about the move itself ("what do I threaten?") only says that 36...Rg5 attacks the queen. Chapter 7's question, asked about the position after 36...Rg5 ("what does White want now?"), returns 37.Qxf6+ at once (+10.93 at depth 18). The first question generates candidates; the second catches blunders. Prophylactic thinking and the defender's scan are the same habit.
M3 (with Chapter 9, Tactical Patterns). For positions B2, B5 and B8 above, name the tactical motif (Chapter 9) and say which move of the calculation the motif "suggested" and which part had to be calculated.
Answer
B2: overloaded defender / removing the defender — suggests Qxe7; calculation confirms Rxc5 follows. B5: intermezzo (in-between check) — suggests Nxf3+ before recapturing; calculation checks the queen exchange first. B8: attraction + fork — suggests Rh7+ to bring the king to h7; calculation must also find that Black's best is not to recapture on e4.
M4 (with Chapter 1, How to Think About Chess). Chapter 1 described engines as searching and humans as planning. Using the depth chart in Section 10.6, explain why both a human and a shallow engine could approve 46.g6.
Answer
Both see the plan (the pawn storming the king) and stop before the opponent's forcing replies. A shallow engine stops because of its depth limit; a human stops because the move "fits the plan". Both fail the same way — by not continuing to a quiet position — which is why the depth needed (about 10 plies here) matches the length of Black's check sequence.
Part E — Research & Extension ⭐⭐⭐⭐
E1. A calculation rating. Using the Lichess puzzle database, build a model that predicts a puzzle's rating from features you can compute: solution length, first-move kind, number of legal moves, number of forcing moves, scan rank of the solution, number of quiet moves in the solution. Report the variance explained by each feature and discuss which aspect of calculation (breadth, depth, quietness) matters most. Keep the sample under 200,000 puzzles.
E2. Calculation under time pressure in OTB games. Using broadcast OTB games with clocks and evaluations, find positions where the side to move faced an opponent's forcing reply that won (≥ 300 cp swing after a natural move) and measure how often the player avoided it, by remaining clock time (before and after move 40 in classical games). Present your result with intervals and discuss the confounders (position complexity, rating, event type).
E3. A human-style search. Extend outpost.calc with a "human search" function: candidates from the
forcing scan plus the engine's top two quiet moves, two replies per node, depth limited to the first quiet
position, and a fixed budget of 100 positions. Test how often it finds Stockfish's best move on 500
puzzles of different lengths, and compare its errors with the errors real solvers make (puzzle ratings).