Chapter 9 Exercises — Tactical Patterns
Difficulty legend: ⭐ recall and concepts · ⭐⭐ apply to a position or a small script · ⭐⭐⭐ judgement, transfer, larger analysis · ⭐⭐⭐⭐ open-ended research
All Part B positions are real Lichess puzzles (public IDs: lichess.org/training/<id>), taken from real games. Every solution was checked with Stockfish 19 at depth 20 by code/07_exercise_positions.py; the evaluations below are that script's output, from White's point of view. Solve from the diagram first — no board, no engine.
Part A — Concepts ⭐
A1. Define fork, pin and skewer in one sentence each, using the words "front" and "behind" where they apply.
Answer
A fork is one piece attacking two (or more) worthwhile enemy targets at once. A pin is a line piece attacking an enemy piece in front with a more valuable piece behind, so the front piece cannot (absolute pin) or should not (relative pin) leave the line. A skewer is a line piece attacking a more valuable piece in front that must move, exposing a piece behind it.
A2. Why can a double check only be answered by a king move?
Answer
There are two checking pieces on two different lines. Capturing one leaves the other giving check; blocking one line leaves the other. Only moving the king can escape both at once.
A3. Explain the difference between deflection and attraction (decoy). Give one example of each from the chapter.
Answer
Deflection drives a defender away from a duty (SUGCV: 21...Qc3+ forces the b2-pawn away from a3, then 22...Ba3#). Attraction drags a piece onto a square where it becomes a target (Jgeir: 33.Qxh7+ Kxh7 drags the king to h7 for 34.Rh4#; NNjAF: 17.Qxd8+ Kxd8 brings the king into range of 18.Nxf7+).
A4. What does it mean for a defender to be overloaded, and how is that related to deflection?
Answer
An overloaded defender is the only guard of two or more attacked things. Overload is the condition; deflection (forcing it to deal with one duty) is the move that exploits it. In 1C0l6 the black king was the sole defender of b7 and of the queen on d7, and 17.Bxb7+ made it choose.
A5. The book's operational fork definition requires the forking piece to be "safe". Why is that condition needed, and when might a real fork violate it and still work?
Answer
Without it, any piece that attacks two things counts as a fork even when it can simply be captured for free, which wins nothing. A real fork can still work when the forking move gives check: the opponent must answer the check first, and if the only way to capture the forking piece is with a piece that is itself needed elsewhere, or if capturing loses to a follow-up, the fork succeeds. Definitions are filters, not truths.
A6. In the Lichess puzzle database, which is harder, a 2-move fork puzzle or a 2-move pin puzzle — and by how many rating points (medians)?
Answer
The pin: median 1452 vs 1094 for the fork, a difference of 358 points (two-move puzzles only; Lichess puzzle ratings).
A7. What is the "one move, two problems" principle, and why is it the common root of nearly all motifs?
Answer
Each side makes one move per turn. A move that creates two threats that a single reply cannot meet wins something. Forks, discovered attacks and double checks create two threats directly; pins and skewers create threats along a line that cannot be answered without exposing something else; defender motifs remove the one reply that would have answered the threat.
A8. State the chapter's threshold concept in your own words, and name the strategic asset behind each of the two main games in 9.8.
Answer
Tactics are usually the consequence of earlier strategic advantages, not random accidents; you can create the conditions for them. Karpov–Martín González 1977: a knight anchored on d5 for 32 plies. Aronian–Shankland 2026: a passed a-pawn on a6 that guarded the entry square b7.
Part B — Positions ⭐⭐
For each position: find the tactic, name the motif(s), and give the main line. Then open the answer.
B1. Find the tactic. Lichess puzzle 4YFq6 (rating 1466). Black to move; White has just played 20.Nxe5.

♟️ Position: White Kg1, Rc1, Re1, Bb2, Bg2, Ne5, f2, a3, g3, c4, h4, b5; Black Kg8, Ra7, Rd8, Be6, Bg7, Ne7, e3, f5, b6, g6, h6, c7 — Black to move. FEN:
3r2k1/r1p1n1b1/1p2b1pp/1P2Np2/2P4P/P3p1P1/1B3PB1/2R1R1K1 b - - 0 20
Answer
20...exf2+! 21.Kxf2 Rd2+ 22.Kf1 Rxb2. The pawn capture with check attracts the king to f2, where 21...Rd2+ forks the king and the bishop on b2. Stockfish 19 (depth 20): 20...exf2+ −5.39; the second-best move, 20...f4, only −0.17. Motifs: attraction + fork (Lichess tags attraction and fork; our detector also flags a skewer along the second rank).
B2. Find the tactic. Lichess puzzle r0qdL (rating 1612). White to move; Black has just played 22...R4d7.

♟️ Position: White Kc1, Re1, Re7, Bg5, Bf7, a2, b2, g2, c3, h3; Black Kh8, Rd7, Rd8, Bc6, Bg7, Nb6, c5, g6, a7, b7, h7 — White to move. FEN:
3r3k/pp1rRBbp/1nb3p1/2p3B1/8/2P4P/PP4P1/2K1R3 w - - 1 23
Answer
23.Re8+! Rxe8 24.Rxe8+ Bf8 25.Bf6#. After the rook trade, Black's only block is ...Bf8, and that bishop is then pinned along the eighth rank by the rook on e8. 25.Bf6 checks along the long diagonal; g8 is covered by the bishop on f7 and g7 by the bishop on f6, and the pinned bishop on f8 cannot help. Stockfish 19 (depth 20): mate in 3; second-best 23.Rxd7 is +0.04. Motifs: back-rank pressure + pin (Lichess: pin, doubleBishopMate).
B3. Find the tactic. Lichess puzzle BNeFU (rating 1429). Black to move; White has just played 18.Bxe5.

♟️ Position: White Kd2, Qc2, Ra1, Rh1, Be4, Be5, a2, b2, f2, c3, e3, h4; Black Kh8, Qd8, Ra8, Rf8, Bb7, d4, c5, b6, e6, a7, g7 — Black to move. FEN:
r2q1r1k/pb4p1/1p2p3/2p1B3/3pB2P/2P1P3/PPQK1P2/R6R b - - 0 18
Answer
18...Rxf2+! 19.Kc1 Rxc2+. The rook takes on f2 with check along the second rank. python-chess lists four legal replies — Kc1, Kd1, Ke1, Kd3 — and every one steps off the rank, so the queen on c2 behind the king falls (after 19.Kd3 the king can recapture, but White has still lost queen for rook). A skewer. Stockfish 19 (depth 20): −8.63; second-best 18...d3, +0.76 — every other move gives White the advantage. Note how the white king and queen stood on one rank with only a pawn between them: that is the warning sign.
B4. Find the tactic. Lichess puzzle Ce8yf (rating 1440). White to move; Black has just played 19...fxe6.

♟️ Position: White Kg1, Qh5, Ra1, Bg5, Nf6, a2, b2, g2, h2, c3; Black Kd8, Qg6, Ra8, Rh8, Bf8, Nc6, d4, f5, e6, a7, b7, h7 — White to move. FEN:
r2k1b1r/pp5p/2n1pNq1/5pBQ/3p4/2P5/PP4PP/R5K1 w - - 0 20
Answer
20.Nxh7+! Qxg5 21.Qxg5+. The knight leaves f6 with a capture, uncovering the bishop on g5's check on d8 — a discovered check. Black has eight legal replies; Stockfish 19 (depth 20, five lines) rates the least bad, 20...Qxg5, at +3.68 and all the others at +8.19 or worse. After 20...Qxg5 21.Qxg5+ White has won the queen for a bishop. Stockfish 19 (depth 20): +4.77; second-best 20.Re1 is −6.98. Our detector flagged the set-up on the board before the move: White has a discovery: Bg5 hits Kd8 by moving Nf6 — check.
B5. Find the tactic. Lichess puzzle qZjFz (rating 1439). Black to move; White has just played 36.Rb1.

♟️ Position: White Kh1, Qb6, Qa8, Rb1, Nd2, f2, g2, e3, g3, d4, b7; Black Kd7, Qd1, Rb8, Rh8, Bf1, h2, c6, d6, f6, e7 — Black to move. FEN:
Qr5r/1P1kp3/1Qpp1p2/8/3P4/4P1P1/3N1PPp/1R1q1b1K b - - 1 36
Answer
36...Bxg2+! 37.Kxg2 h1=Q#. The bishop captures on g2 with check and uncovers the queen on d1's check along the first rank — a double check, so White's only legal answer is a king move, and capturing on g2 is the only one available. Then the h-pawn promotes with mate. Stockfish 19 (depth 20): mate in 2; second-best 36...Qxd2 is +8.66 — White, with two queens, is winning otherwise. Our detector tags 36...Bxg2+ as discovered attack + discovered check + double check.
B6. Find the tactic. Lichess puzzle L3WHe (rating 1683). White to move; Black has just played 19...a6.

♟️ Position: White Ke1, Qa4, Ra1, Rh1, Bf1, Bf4, Nh3, a2, f2, c3, b4, d4, g4, h5; Black Kc8, Qe7, Rd8, Rh8, Bh7, Nf6, Nd7, e4, a6, c6, e6, h6, b7, f7, g7 — White to move. FEN:
2kr3r/1p1nqppb/p1p1pn1p/7P/QP1PpBP1/2P4N/P4P2/R3KB1R w KQ - 0 20
Answer
20.Qxc6+! bxc6 21.Bxa6#. Our detector names the condition: White can exploit an overloaded b7 — sole defender of a6 and c6. The queen sacrifice on c6 deflects the b7-pawn, and the bishop mates on a6 along the f1–a6 diagonal (it also covers b7), with the f4-bishop covering c7 and b8 and Black's own knight on d7 and rook on d8 blocking the rest. Stockfish 19 (depth 20): mate in 2; second-best 20.g5, +1.81. This is the same picture as SUGCV in 9.5 with colours reversed — a pawn guarding two squares next to the king.
B7. Find the tactic. Lichess puzzle w5bG5 (rating 1402). White to move; Black has just played 22...Be6.

♟️ Position: White Kd2, Re1, Rh1, Ne7, b2, c2, b3, f4; Black Kh8, Ra8, Rf8, Be6, d6, a7, b7, c7, f7, g7, h7 — White to move. FEN:
r4r1k/ppp1Nppp/3pb3/8/5P2/1P6/1PPK4/4R2R w - - 2 23
Answer
23.Rxh7+! Kxh7 24.Rh1+ Bh3 25.Rxh3#. The rook sacrifice attracts the king to h7; the knight on e7 covers g8 and g6, and the second rook mates on the h-file after the bishop's interposition is captured. Stockfish 19 (depth 20): mate in 3; second-best 23.f5 is −0.69. Compare with Jgeir in 9.5 — the same knight-on-e7 mating picture (Lichess tags both anastasiaMate).
B8. Find the tactic. Lichess puzzle wRW8D (rating 1474). Black to move; White's queen has just captured on b7.

♟️ Position: White Ke1, Qb7, Ra1, Rh1, Bc1, Nb1, Ng1, a2, b2, c2, f2, g2, h2, e5; Black Ke8, Qd8, Ra8, Rh8, Bd7, Bf8, Nb8, a7, c7, e7, f7, g7, h7 — Black to move. FEN:
rn1qkb1r/pQpbpppp/8/4P3/8/8/PPP2PPP/RNB1K1NR b KQkq - 0 9
Answer
9...Bc6! 10.Qb3 Bxg2. The bishop attacks the greedy queen and opens a second front: from c6 it eyes the long diagonal towards g2 and the rook on h1. The queen must retreat (10.Qb3 in the puzzle line), and 10...Bxg2 wins the g2-pawn with the rook on h1 next: Stockfish's own line is 10.Qb4 Bxg2 11.Nc3 Bxh1. Lichess tags it interference. Stockfish 19 (depth 20): −5.99; the natural 9...Nc6 is +0.51. Interesting detail: our geometric detector finds nothing here — the tactic is a double attack whose second threat (on g2 and h1) is a future capture, not a current attack on a piece. Some motifs are about what comes next.
Part C — Data & Code ⭐⭐–⭐⭐⭐
C1. Database research ⭐⭐. Extend code/01_puzzle_motif_stats.py to compute, for the fork, pin and skewer, the share of each motif's puzzles that are also tagged endgame, middlegame and opening. Input: the four puzzle columns the script already reads. Expected output: a 3 × 3 table of percentages. Which motif is most "endgame-heavy", and does that fit the geometry (fewer pieces, more open lines)?
Answer sketch
Add flags["endgame"], etc., and print flags[[...]].groupby(...) style shares, e.g. (flags[m] & flags["endgame"]).sum() / flags[m].sum(). Report what you find with n. A reasonable prediction is that skewers lean towards the endgame (open lines, exposed kings) — but check rather than assume.
C2. Database research ⭐⭐. The chapter compared motifs at a fixed solution length of two moves. Produce the same comparison for three-move puzzles from the script's output and plot it. Does the ordering (skewer ≈ fork < discovered attack < deflection < pin < ...) survive at length 3?
Answer sketch
The script already prints medians for lengths 1–4. At length 3 the output is: fork 1591, skewer 1531, attraction 1636, deflection 1663, discovered attack 1720, double check 1778, interference 1821, pin 1826, clearance 1860. The skewer is still easiest and the pin and clearance still hardest; the attraction, which is mostly a 3-move motif (only 22% of attraction puzzles are 2-move), is relatively easier at length 3 than at length 2.
C3. Engine analysis ⭐⭐. Use engine.evaluate(fen, depth=20, multipv=3) on the eight Part B positions and record the gap between the best and second-best move in win-% points (chessdata.win_pct). Is the gap larger for mates than for material-winning puzzles? Expected output: an 8-row table: puzzle id, best, second, gap.
Answer sketch
Mates are clipped to ±1000 cp (win % ≈ 97.5 for the winning side), so mate puzzles show the largest gaps unless the second-best move is also winning. The pattern "one move far ahead of the others" holds in every Part B puzzle, which is exactly the engine's signature of a tactic (9.9).
C4. Detector development ⭐⭐⭐. The detector's pin finder has 17.4% precision. Implement a stricter version: count a pin only if the pinned piece is attacked at least as many times as it is defended, or is attacked by a cheaper piece. Re-run code/03_detector_validation.py and report hit rate, false-alarm rate and precision for the new pin finder.
Answer sketch
Add the condition inside _line_motifs_from (or write find_pins_strict). Expect the false-alarm rate to fall and the hit rate to fall too; whether precision improves depends on how many real pin puzzles involve a pin that is exploited by piling up versus a pin that matters because of a different threat (as in S8quN, where the pinned rook simply couldn't block). That trade-off is the general lesson of detector design.
C5. Database research ⭐⭐⭐. Repeat code/04_blunder_motifs.py for rapid instead of blitz (change one filter). Does the unpunished share fall at slower time controls? Expected output: the same band table for rapid, plus one sentence comparing it with blitz.
Answer sketch
Change g.speed == "blitz" to "rapid" (some high bands may have fewer than 1,200 analysed games — the script samples min(PER_BAND, len(grp)), so report n). Compare band by band, with the Wilson intervals. Whatever you find, state the filter: analysed Lichess rapid games, punished = still ≥ 10 win-% points worse after the reply.
C6. Database research ⭐⭐⭐. Search A in code/05_strategy_to_tactics_search.py requires a knight on an outpost for six plies. Change it to bishops on outposts delivering a fork or a skewer. How many master games qualify? Pick one and annotate the strategic phase in five sentences.
Answer sketch
Replace the knight test with p.piece_type == chess.BISHOP and add _line_motifs_from(after, mv.to_square) skewers to the fork test. Expect fewer hits than for knights — bishops rarely jump from an outpost into a fork; their tactics usually work along lines from where they stand. That difference is itself a finding about piece geometry.
Part D — Judgment & Transfer ⭐⭐⭐
D1. A 1200-rated club player asks: "Should I do pin puzzles or fork puzzles?" Use the chapter's data to give a two-paragraph answer that distinguishes seeing tactics from looking for them.
Answer
Seeing: pins are much harder to see than forks (two-move medians 1452 vs 1094), and the pin's share of puzzles grows with difficulty, so pin puzzles train the pattern that will matter more as the player improves. Looking: in real Lichess blitz games around 1000–1399, 36% of blunders go unpunished on the next move and nearly half of punished blunders are punished by a plain capture. So the biggest immediate gain at 1200 is the habit of checking every opponent move for loose pieces — a habit puzzles don't build. Recommendation: mixed-motif puzzles for pattern recognition, plus slower games with a deliberate blunder check.
D2. In the Aronian–Shankland game, Shankland's move 35...Nd7 is only an "inaccuracy" by the book's win-% classification, yet it allowed the decisive fork. Explain why, and say what this means for using accuracy numbers to judge a game.
Answer
At +2.31 the win-% model already gives White about 70%; after 35...Nd7 (+3.32 at depth 16) it is about 77%. The drop, about 7 points, crosses only the inaccuracy threshold (5). Win-% classifications are deliberately insensitive in already-decided positions. So a low error count does not mean a player defended well — it can mean the game was lost earlier, slowly. Look at when the evaluation drifted (here: over moves 26–35), not only at the labelled errors.
D3. Karpov declined to cash a fork (30.fxg6 instead of 30.Nxe8). Construct a general rule for when to execute a fork and when to keep it as a threat, and test it on the engine numbers given in 9.8.
Answer
A reasonable rule: cash the fork when nothing better is available or when the opponent can untangle next move; keep it as a threat when the forked side cannot escape it quickly and you have a stronger forcing continuation that the fork supports. In 9.8, after 29...Kf8, the e8-rook could not easily escape and 30.fxg6 continued the attack: Stockfish 19 (depth 20) +6.95 vs +4.57 for 30.Nxe8. The rule passes this test; check it on other positions before trusting it.
D4. Engine vs human: Stockfish has no concept of "pin" or "fork". Argue for and against teaching motif names at all in an engine age.
Answer
For: humans cannot search millions of positions; names compress patterns so we can find candidate moves quickly, and they let us explain engine output (9.9). Against: names can make players see patterns that don't work (the detector's 21% false-alarm rate for pins is a picture of that) and can make them ignore tactics that don't fit a name (B8). A balanced view: use names to direct attention, calculation to decide.
Part M — Mixed / Interleaved ⭐⭐–⭐⭐⭐
M1 (with Chapter 3). In Karpov–Martín González, the d5-knight was not an outpost by the toolkit's strict definition until ...exf6. Use Chapter 3's outpost.activity functions to report the d5-knight's mobility at plies 25, 40 and 50, and compare it with Black's least active minor piece. What does "activity" say that "outpost" does not?
Answer sketch
Load the game with chessdata.find_game(white="Karpov", black="Martin Gonzalez", year=1977), replay to each ply and call activity.piece_report. The point: a piece can be dominant without meeting a strict outpost definition — activity measures what it does, the outpost test what can be done to it.
M2 (with Chapter 4). Which of the Part B positions involve a king whose pawn shelter has been damaged or is missing? For each, name the defensive pawn move (or capture) that created the weakness the tactic exploits.
Answer sketch
B2, B4, B5, B6 and B7 all exploit kings with thin cover: B7 and Jgeir (9.5) the h-file in front of a castled king, B5 a king with the h-pawn gone, B6 a queenside king behind a single b7-pawn. Name the specific pawn in each case from the diagram.
M3 (with Chapter 7). Run Chapter 7's prophylaxis.threat() on the position after 25...Nd8 in Karpov–Martín González (FEN in 9.8) with Black to move (flip the turn on a copy) and on the position after 35.Qb2 in Aronian–Shankland. What does each opponent "want", and does the threat involve one of this chapter's motifs?
Answer sketch
Use the module's null-move threat finder at depth 16 and pass the threat move to tactics.move_motifs on the passed position. Report the threat move, its size in win-% points, and its motif tags. The exercise links "what does my opponent want?" (prophylaxis) with "which pattern would it be?" (tactics).
M4 (with Chapter 6). After 37.Qxa7 Rxa7 in Aronian–Shankland, White has R+B vs R+N with a far-advanced passed pawn. Use Chapter 6's material-signature lookup to find how the R+B vs R+N imbalance scores in the book's data, and explain why that average is nearly useless here.
Answer sketch
The book's OTB data puts the bishop side of R+B vs R+N with level pawns at 49.5% (n = 10,652) — no measurable edge either way. Here the pawn on a6–b7 and the knight's lack of squares dominate; averages describe typical positions, and this one is not typical. The tactic (36.Qb7) is what converted the specific advantages into a position no average describes.
M5 (with Chapter 2). The Karpov game featured a Dragon structure (Black's pawns on d6/g6, no c-pawn). Using structures.classify_structure at ply 30, which label does the toolkit assign, and how does the structure explain why d5 was available to White's knight?
Answer sketch
The toolkit labels it OpenSicilian:white at plies 20, 30 and 40. With Black's c-pawn exchanged and the e-pawn on e7, the only pawn that could ever challenge d5 is ...e6 — which would weaken d6. The structure made d5 a long-term home, and the home made the fork.
Part E — Research & Extension ⭐⭐⭐⭐
E1. Motifs in your own games. Download 100 of your own games (Chapter 1's games.py), run tactics.scan_game and the engine at depth 16, and build a personal table: blunders you made, the motif of the opponent's punishing reply, blunders by your opponents that you left unpunished. Compare your unpunished share with the population band nearest your rating in 9.6, with a Wilson interval. Write one paragraph on what you will train next.
E2. A better overload detector. Lichess has no overload tag. Design an overload detector that includes mating-square duties (a piece that guards a square needed to stop mate), validate it on Lichess puzzles tagged deflection (where overloads should be common) against a control sample, and report hit rate, false-alarm rate and precision as in 9.7.
E3. Strategy → tactics across eras. Run search C of code/05_strategy_to_tactics_search.py on broadcast games at three FIDE bands (1800–1999, 2000–2199, 2200–2399, classical only). Does the motif mix at the "harvest" moment change with level — more forks lower down, more pins higher up? Report counts with the filter, and discuss what the relay evaluations (varying engines and depths) do to the reliability of the "slow edge" definition.