Chapter 38 — Exercises
Difficulty: ⭐ concept check · ⭐⭐ position or short data task · ⭐⭐⭐ judgement / extended code · ⭐⭐⭐⭐ open research.
Every position below comes from a real game in the book's data snapshot (anonymous Lichess rapid players, and one anonymous low-rated over-the-board game). Each is shown before the move the player actually chose. Solutions were checked with Stockfish 19 at depths 18 and 22 (two-line search) and, for the endgame, the Syzygy tablebase; the outputs are in code/_out06.txt.
Part A — Concepts ⭐
A1. Name the six error types used in this chapter, in the order the rule checks them, and give a one-sentence teaching response to each.
Answer
Allowed a mate (teach mating patterns and king safety); left a piece en prise (teach the safety question: what does my move leave loose?); walked into a tactic (teach motifs from the opponent's side); failed to punish (teach the scan after every opponent move: what can I take, check or threaten?); endgame conversion error (teach technique and calculation in small endgames); other (calculation and plans). The order matters: a move that both allows mate and hangs a piece is counted once, as the more severe type.
A2. Below 1000 (Lichess rapid), 28.9% of the win % lost to blunders is lost in the opening phase. Why does that not show that beginners should study openings?
Answer
Because of what those opening-phase blunders are: 25.5% leave a piece en prise and 25.7% fail to punish one, and half of all queens left en prise in the opening (117 of 232) were left by sub-1000 players. The losses happen early, but they are tactical losses. Teaching the safety habit removes them; memorizing lines does not.
A3. The hung-piece rule agreed with Stockfish's best reply 71.7% of the time [66.3–76.5]. Give two kinds of position where the rule flags a hanging piece but the engine's best reply is something else.
Answer
(1) There is something even better for the opponent — a mate, a fork that wins more, a promotion. (2) Taking the piece walks into a counter-shot (the "hanging" piece is poisoned: a back-rank mate or a recapture with a fork follows). In both cases the piece is genuinely attacked, so the rule is not wrong about the board — it just isn't the whole story.
A4. Explain the difference between an error rate (per 100 moves) and an error share (% of blunders), using the endgame conversion figures (rate 0.25 → 0.24; share 2.3% → 6.0%).
Answer
The rate is how often the error happens per move played; the share is its fraction of all blunders. Endgame conversion errors happen at almost the same rate at every level, but stronger players make far fewer other blunders, so the same rate becomes a bigger share. A curriculum weighted by share gives endgames more time at higher levels — correctly — but a coach should not read the rising share as "strong players convert worse".
A5. What is the productive-struggle window for a solver with a puzzle rating of 1250, by the Elo formula and the 60–80% convention? Why is the convention a coaching choice rather than a measured fact?
Answer
P between R − 241 and R − 70: about 1009–1180. The 60–80% band is chosen to balance effort and success; the book has no experiment showing it is optimal, only the formula that converts a chosen success rate into a rating window.
A6. Why does coach.compare use |z| ≥ 2.77 instead of 1.96 when all nine metrics are read together?
Answer
With nine tests at the 5% level, the chance of at least one false alarm in an average student is roughly 1 − 0.95⁹ ≈ 37%. The Bonferroni threshold 2.77 keeps the chance of any false alarm across the nine tests near 5%. The cost is lower sensitivity: real but modest gaps (Grace's allowed mates, z +2.2) go unflagged until more games accumulate.
A7. Give the reason behind each rule, in one sentence: (a) "Don't bring the queen out early." (b) "Develop before you attack." (c) "Put rooks on open files."
Answer
(a) An exposed queen can be attacked by developing moves, so your opponent gains tempi while you lose them — and when the queen can't be attacked with tempo (Scandinavian ...Qa5), the rule doesn't apply. (b) An attack with few pieces is met by more defenders, and undeveloped pieces leave your own king and centre weak (the 1901 Capablanca position). (c) A rook's power is the length of the line it controls; on an open file it reaches the enemy position, behind pawns it does nothing.
A8. In the census, about six in ten "other" blunders were followed by a quiet reply. What does that suggest about the training those errors need?
Answer
The punishment was not an immediate shot but a threat, a regrouping or a pawn break — so the error was one of understanding what the position needed, not of missing a forcing line. That calls for planning, prophylaxis ("what does he want?") and calculation of quiet candidate moves, not more puzzles of the "find the combination" kind.
Part B — Positions ⭐⭐
B1. Find the tactic (Foundations). White to move. The game began 1.e4 e5 2.Qh5 Nh6 3.Qxe5+ Be7.

♟️ Position: White Ke1, Qe5, Ra1, Rh1, Bc1, Bf1, Nb1, Ng1, a2, b2, c2, d2, e4, f2, g2, h2; Black Ke8, Qd8, Ra8, Rh8, Bc8, Be7, Nb8, Nh6, a7, b7, c7, d7, f7, g7, h7 — White to move. FEN:
rnbqk2r/ppppbppp/7n/4Q3/4P3/8/PPPP1PPP/RNB1KBNR w KQkq - 1 4
Solution
4.Qxg7! wins a pawn and attacks both the rook on h8 and the knight on h6: +8.15 (Stockfish 19, depth 18) / +8.32 (depth 22); the next best, 4.d4, is only +2.71 / +2.53. The player (rated below 1000) chose 4.Qf4, after which the position is +0.61 (depth 18). Teaching point: the queen on e5 already eyes g7, and nothing defends it — the knight went to h6, the bishop to e7, and neither guards g7. The safety question run for the opponent ("what is loose in his camp?") finds it at once.
B2. Find the tactic (Foundations). White to move. Black's king has wandered to e6.

♟️ Position: White Ke1, Qh5, Ra1, Rh1, Bb5, Bc1, Nb1, a2, b2, c2, d2, e4, f2, g2, h2; Black Ke6, Qd8, Ra8, Rh8, Bd7, Bf8, Nc6, Ng8, a7, b6, c7, d6, e7, g7, h7 — White to move. FEN:
r2q1bnr/p1pbp1pp/1pnpk3/1B5Q/4P3/8/PPPP1PPP/RNB1K2R w KQ - 2 7
Solution
7.Qf5# — mate in one (Stockfish 19 at depths 18 and 22: #1; the second line, 7.Bc4+, mates in 5). The king on e6 has no flight square: d5 is covered by the e4-pawn and the queen, e5, f6 and f7 by the queen, the queen itself is defended by the e4-pawn, and d6, d7 and e7 hold Black's own pieces. (The game went 1.e4 d6 2.Bb5+ Bd7 3.Nf3 Nc6 4.Ng5 b6 5.Nxf7 Kxf7 6.Qh5+ Ke6.) The player castled instead (+5.06 at depth 18 — still winning, but no longer mate). Teaching point: when the enemy king is exposed, checks first — and look at every check, including the quiet-looking queen move.
B3. Find the tactic (Foundations). White to move.

♟️ Position: White Kg1, Qd3, Ra1, Rf1, Bc1, Nc3, Nf3, a2, b2, c2, d4, e4, f2, g2, h2; Black Ke8, Qd8, Ra8, Rh8, Bd6, Nc6, Nf6, a6, b7, c7, d5, e6, f7, g7, h7 — White to move. FEN:
r2qk2r/1pp2ppp/p1nbpn2/3p4/3PP3/2NQ1N2/PPP2PPP/R1B2RK1 w kq - 0 9
Solution
9.e5! forks the bishop on d6 and the knight on f6 with a pawn: +6.04 (depth 18) / +5.94 (depth 22); quiet alternatives such as 9.Re1 or 9.exd5 are only about +0.5 to +0.6. The player chose 9.Bg5 (+0.71). Teaching point: the pawn fork is the cheapest fork there is — two pieces side by side on the sixth (or third) rank in front of an enemy pawn are a target.
B4. Find the tactic (Foundations). Black to move.

♟️ Position: White Kg1, Qa1, Re1, Bg2, Ne4, Nf3, d4, f2, g3, h2; Black Kg8, Qe7, Rf8, Bc8, Bd6, Nb4, b7, c4, e6, f7, g7, h6 — Black to move. FEN:
2b2rk1/1p2qpp1/3bp2p/8/1npPN3/5NP1/5PBP/Q3R1K1 b - - 1 17
Solution
17...Nc2! forks the queen on a1 and the rook on e1: −6.59 (depth 18) / −6.66 (depth 22). The player chose 17...Nd3 (−3.03 at depth 18), which attacks the rook but not the queen. Teaching point: of the knight's available squares, choose the one that hits the two most valuable targets — and check that the knight can't simply be taken there.
B5. Find the tactic (Foundations). White to move.

♟️ Position: White Kg1, Qb3, Ra1, Rf1, Be2, Bf4, Nb1, Nf3, a2, b2, c3, d4, e3, f2, g2, h2; Black Kc8, Qa5, Rd8, Rh8, Bf5, Bf8, Nc5, Nf6, a7, b7, c6, d5, e6, f7, g7, h7 — White to move. FEN:
2kr1b1r/pp3ppp/2p1pn2/q1np1b2/3P1B2/1QP1PN2/PP2BPPP/RN3RK1 w - - 5 10
Solution
10.dxc5 wins material: +6.33 (depth 18) / +6.48 (depth 22); the second line, 10.Qd1, is about +1.3. The knight on c5, which had just arrived there with 9...Nc5 attacking the queen, is taken by the d4-pawn, and in Stockfish's line (10...h5 11.Nbd2 Bxc5) Black regains only a pawn for it. The player chose 10.Qa3, offering a queen trade, and after it the position is −0.51 (depth 18). Teaching point: pawns capture too — the first question "what can I take?" includes pawn captures.
B6. Analyze this position (blunder check, OTB). White to move, from an over-the-board classical game between two players rated below 1400 FIDE. White is considering 16.Bh5, attacking the g6-pawn. What is wrong with it, and what is a sensible move instead?

♟️ Position: White Kg1, Qd1, Rb1, Rf1, Bf3, Bg5, Nb3, a2, c2, d3, f2, g2, h2; Black Kg8, Qe8, Ra8, Rf8, Bc8, Bg7, Nc6, a7, b6, d5, e6, f7, g6, h7 — White to move. FEN:
r1b1qrk1/p4pbp/1pn1p1p1/3p2B1/8/1N1P1B2/P1P2PPP/1R1Q1RK1 w - - 2 16
Solution
16.Bh5?? puts the bishop on a square the g6-pawn attacks: 16...gxh5 wins it, and the position becomes −6.98 (depth 18). That is exactly what happened in the game. Stockfish 19 prefers 16.Qd2 −1.60 (depth 18) / −1.72 (depth 22) (16.Re1 is about the same): White is somewhat worse, but whole. Teaching point: the safety question includes the square you are moving to — "can it be taken there, and by what?" — and pawns are the attackers beginners forget.
B7. Endgame technique (Plans). White to move. King and three pawns against king and bishop, from a game between two players rated 1600–1799.

♟️ Position: White Kb5, a4, b4, c4; Black Kc7, Ba7 — White to move. FEN:
8/b1k5/8/1K6/PPP5/8/8/8 w - - 1 52
Solution
The tablebase says White wins with exactly two moves, 52.a5 or 52.c5 (Stockfish 19: a5 +6.45 at depth 18; at depth 22 c5 and a5 both +6.36). The idea of both: advance a pawn to a square the bishop does not control and use the king to escort the remaining pawns, so that the bishop must eventually give itself up. The player chose 52.Ka6, which drew (after it the position is +0.31 at depth 18). Teaching point: with an extra piece's worth of pawns, the plan is to create a pawn the bishop cannot stop — calculate the pawn moves first, king moves second.
Part C — Data & Code ⭐⭐–⭐⭐⭐
C1. Database research ⭐⭐. Load code/census_errors.csv.gz. For Lichess rows, compute the share of "left a piece en prise" blunders whose flagged piece is a queen, by band (the detail column starts with the piece letter). Expected output: a 8-row table with one percentage per band. Compare with the printed table in code/_out01.txt (Q: 21.3% below 1000, 19.0% at 2200+).
Hint
h = e[(e.source=="lichess") & (e.error_type=="hung_piece")]; h["piece"] = h.detail.str[0]; pd.crosstab(h.band, h.piece, normalize="index").
C2. Database research ⭐⭐. Using code/census_player_games.csv.gz, compute for each Lichess band the average number of winning endgames per 100 games (winning_endgame column). Does it rise with rating? Use the answer to explain why the endgame-conversion error share rises while the conversion rate is flat.
C3. Engine analysis ⭐⭐⭐. Extend code/03_missed_tactics.py with a part (d): sample 200 "other" blunders per level, play the blunder on the board, and ask Stockfish 19 (depth 14) for the opponent's best reply in that position. Label it with coach.missed_motif (it labels the side to move's best move). Output: a table of labels by level. Question: at Foundations level, what share of "other" blunders were tactical (best reply a capture, check, mate or named tactic) rather than quiet?
C4. Code ⭐⭐. Add a seventh error type to coach.classify_error: time-trouble blunder, checked first, when the mover's clock was below 10% of the base time. Rerun the census on the Lichess half only. How much does each existing type shrink at 2200+?
C5. Code ⭐⭐⭐. The hung-piece rule ignores pawns (min_value=3). Run the census with min_value=1 (pawns count as en prise) on 300 games per band and report how the "left a piece en prise" share changes. Then validate the new rule against Stockfish as in 38.1. Is the change an improvement for coaching?
C6. Database research ⭐⭐. Puzzles: for a student with puzzle rating 1350, compute the productive-struggle window with coach.puzzle_window(1350) and count how many puzzles in the database fall in it and carry the fork tag. Expected shape: one window (two integers) and one count.
Part D — Judgement & Transfer ⭐⭐⭐
D1. A parent asks you to teach their 1100-rated daughter "the Sicilian, because the strong players use it". Using the census and Chapter 22's opening facts ( the Sicilian does not score above 50% for Black among masters), write a 150-word reply that respects the request and explains your plan.
D2. Your student is 2000 OTB and loses most games in the last hour of play. The census says 33.7% of OTB blunders at 1800–1999 are made with less than 10% of the base time left. Design a four-week clock-management block. What would you measure to know whether it worked, and how many games would you need?
D3. Engine vs human. In the Bernasek–Rubes ending, Stockfish's verdict went from mate in five to +0.03 to "won" again in two moves. How would you use that sequence with (a) a 1300 student and (b) a 2200 student? What is the lesson for each?
D4. What changes in your teaching of the fork between 1000 and 2000? Use the motif ladder, the walked-into-tactic table and the missed-punishment table in your answer.
Part M — Mixed / Interleaved ⭐⭐–⭐⭐⭐
M1 (with Chapter 9). Chapter 9 found that only 10.7% of blunders in Lichess blitz were punished by a named-motif move. This chapter found named tactics in only a thin slice of missed punishments. Write a paragraph reconciling these with the fact that motif puzzles dominate most training apps. What should a coach do about it?
M2 (with Chapter 14). Chapter 14 showed that 34.0% of theoretically won K+P vs K positions were not won below 1200 on Lichess. Find the KPK positions in code/census_errors.csv.gz (fen_before with three pieces) and count how many endgame conversion errors involve them, by band.
M3 (with Chapter 19 and Chapter 23). Combine Chapter 19's tempo costs with Chapter 23's finding that the first off-book move costs 5.2 win-% points below 1000. Design a two-week opening module for a Foundations-level class that teaches reasons, not lines.
M4 (with Chapter 20). Dev's Najdorf story (Anchor C) and Lena's "nothing flagged" report are the same statistical lesson. State it in two sentences, and give the number from each that makes the point.
M5 (with Chapter 13). Chapter 13 showed that errors are much more frequent in positions with only one safe move. Which of this chapter's diagrams are "only-move" positions? How would you build a training set of them from the census?
Part E — Research & Extension ⭐⭐⭐⭐
E1. Does the error mix predict improvement? The broadcast data contain players observed about nine months apart (the improvement panel used in Chapters 25 and 38). For players with enough evaluated games in the first window, compute their error profile with outpost.coach and test whether any error type predicts rating change in the second window, controlling for age and starting rating. Report effect sizes with intervals, and discuss why an association would still not prove that training that error type causes improvement.
E2. A curriculum experiment you could actually run. Write a protocol for a club: two groups of beginners, one taught with the Foundations syllabus (safety habit first) and one with a traditional opening-first syllabus, each for eight weeks. Specify the outcome measure (hung pieces per 100 moves in slow games), the number of games per student needed to detect a 25% difference (use the re-test arithmetic in Case Study 2), and the threats to validity (who chose which group, coach effects, rating changes from playing more).
E3. A better sorting tray. Replace the board rules with a classifier trained on engine labels: for 5,000 blunders, label the type from Stockfish's best reply and principal variation, then train a small model (scikit-learn) on cheap board features to predict the type. Compare its agreement with the engine against the 71.7% of the hung-piece rule.
Worked notes for Parts C, D and M
C2 — winning endgames per 100 games
Group census_player_games.csv.gz (source lichess) by band and take 100 * winning_endgame.mean() (per player-game, so per 100 player-games). The printed census already gives the counts: 412 winning endgames in 2,400 player-games below 1000, then 384, 399, 367, 345, 328, 278 and 284 at 2200+ — they fall slightly with rating (stronger players' games are decided less often by large material leads). So the rising share of conversion errors comes from the shrinking total of other errors, not from more winning endgames.
C3 — what "other" blunders allowed
Use the position after the blunder (chess.Board(fen_before) then push_san(san)); the side to move is the opponent, so missed_motif labels the opponent's best reply. Report the tactical share = free material + mate + named tactic + other capture + check. Expect it to be substantial at Foundations level and to fall with rating; that is the evidence behind reading the Foundations "other" block as "short forcing calculation" rather than "plans".
C4 — time-trouble type
Insert if low_clock: return "time_trouble", ... at the top of classify_error (pass low from analyse_movetext). On Lichess rapid, at most 12.1% of blunders can move into the new type at 2200+ (the low-clock share), and about 1% below 1000, so the existing types shrink by at most those fractions — mostly "other". In OTB classical 2400+, half the blunders would move, which is why the chapter keeps the clock as a separate flag rather than a type: a time-trouble blunder still has a board type the student must learn from.
C5 — counting pawns as en prise
The "left a piece en prise" share will rise (pawns are left loose often), but agreement with the engine's best reply will usually fall, because a loose pawn is less often the best capture. For coaching, the board rule should flag what costs games; a pawn hanging is worth teaching, but blending it into the piece category dilutes the Foundations signal. Report both numbers and decide.
C6 — puzzle window
coach.puzzle_window(1350) returns (1109, 1280). Filter puzzles.parquet (columns rating, themes) to that window and count rows whose themes contain fork — expect tens of thousands, more than any student will ever need.
D1 — the Sicilian request
A good reply agrees to teach the Sicilian as structures and plans later, and explains the order: at 1100 a quarter of blunders leave a piece en prise and another quarter fail to take one, while opening theory moves results by about a point. The Sicilian is a fine choice — on Lichess it even scores slightly better for Black than 1...e5 below 2000 (Chapter 22) — but the plan starts with the safety habit and basic tactics, then introduces the Sicilian through one simple line and its typical structures.
D2 — a clock block
Four weeks: (1) time budget per phase from the student's own clock data (Chapter 13's clock.py); (2) decision rules for "routine" moves and for critical moments; (3) training games with a reduced base time and a fixed increment, reviewing every move made under 10% of base; (4) a tournament simulation. Measure blunders per 100 moves made with less than 10% of base time left. With a baseline of roughly one such blunder every few games, the re-test arithmetic of Case Study 2 says you need well over 50 games per period to see even a halving — so measure across a season, not a month.
D3 — the Bernasek–Rubes ending
(a) For a 1300: the lesson is the simplest one — with a pawn on the seventh, look at promoting with check first; checks, captures, promotions before king moves. (b) For a 2200: the lesson is the clock — both players knew the ending; the errors came at 67 seconds and five minutes. Train recognizing "only-move" endings early enough to spend time on them.
D4 — the fork from 1000 to 2000
At 1000 the fork is a shape to see (median puzzle 1312; forks are 40% of walked-into tactics). At 2000 the fork is something to prepare and prevent: forks are still the largest named motif among walked-into tactics (38.1% at 2200+), but missed punishments are mostly quiet moves (57%), so the work shifts to the move before the fork — the quiet move that creates it, or the prophylactic move that stops it.
M1 — named motifs are a thin slice
Named motifs are the most teachable pattern, not the most frequent punishment: most punishments are plain captures or quiet moves. Coaches should keep motif training (it builds the vocabulary) but pair it with "what can I take?" scans and quiet-move positions from the student's own games, which match what games actually require.
M2 — KPK positions in the census
Filter rows whose fen_before has three pieces and a pawn (len(chess.Board(f).piece_map()) == 3) and error_type == "endgame_technique"; count by band. Expect few rows — KPK positions are rare in 9,600 games — which is why Chapter 14 used every K+P vs K position in the whole data snapshot instead.
M3 — an opening module with reasons
Week 1: the tempo (Chapter 19's pass test — about 0.64 pawns at the start) and the three reasons (develop, centre, king safety), each with a position where the reason fails. Week 2: the first move out of book (Chapter 23: costly below 1000) — practise thinking in a fresh position after move 5 with the safety question. No lines longer than four moves.
M4 — one statistical lesson
A gap is only a finding if it is bigger than the noise expected for the sample size, and when you look at many gaps at once, some will look big by chance. Dev's Najdorf score was 36.0% [24.1–49.9] — an interval that cannot separate it from his band's 44.3%; Lena's nine metrics produced no |z| above 1.96, and Grace's three flags at 1.96 disappear at the corrected 2.77.
M5 — only-move positions
The Bernasek–Rubes ending (twelve winning moves, but only two drawing replies for Black), the K+P vs K position (only 65.g7 wins), Polgár–Gobet (28.Nc4 holds) and Exercise B7 (two winning moves) are only-move or few-move positions. Build a set by running Stockfish multipv 3 on census positions and keeping those where the best move is at least 15 win-% points better than the second.