Chapter 15 Exercises — Pawn Endgames
Difficulty: ⭐ recall and understanding · ⭐⭐ apply at the board or in code · ⭐⭐⭐ analyse and judge · ⭐⭐⭐⭐ open-ended research.
Every position in Part B is either from the chapter's scripts or a constructed position verified with the
Syzygy tablebase and the chapter's own KPK solver (code/09_hook_and_exercises.py, output in
code/out_09.txt). Solve first, at the board or in your head, then open the answer. Positions are
diagrammed; you do not need a physical board.
Part A — Concepts ⭐
A1. Define the opposition in one sentence, and say who "has" it: the side to move or the other side?
Answer
Two kings stand in opposition when their file distance and rank distance are both even (on a shared line: an odd number of squares between them); the side that is not to move has the opposition, because the side to move must give way.
A2. What are the key squares of a White pawn on c3? On c5? On a5?
Answer
c3 (3rd rank): b5, c5, d5. c5 (5th rank): b6, c6, d6, b7, c7, d7. a5 (rook pawn): the textbook says b7 and b8 — but the chapter's exact computation shows that for a rook pawn only b7 is unconditionally winning from a5, and from a2–a4 no square is: the defending king can still walk to the pawn or into the corner.
A3. Why is a king two squares in front of its own pawn (for example Ke4 with a pawn on e2) winning whoever is to move?
Answer
Because the pawn holds a spare tempo. If the defender takes the opposition, the pawn steps forward one square and passes the move back. In the chapter's example (Ke4, Pe2 vs Ke6) 1.e3!, 1.Kf4 and 1.Kd4 win, while retreating moves (1.Kf3, 1.Ke3, 1.Kd3) draw.
A4. State the rule of the square including the double-step correction, and say which half of the rule ("outside → win" or "inside → draw") is more reliable according to the exact KPK solution.
Answer
The defending king catches a lone passed pawn iff its king distance to the queening square is at most the pawn's remaining moves, plus one if the defender is to move; a pawn on its 2nd rank counts as if on its 3rd. "Outside → win" was right in 99.99% of 85,964 positions (five exceptions, all with White's king on a8 blocking a pawn on a7); "inside → draw" only 64.1% of 70,614, because it ignores the attacking king.
A5. What is a mutual zugzwang? How many exist in KPK, and what share of them are opposition positions?
Answer
A position where the side to move is worse off than if the opponent had to move — in KPK: drawn with White to move, won with Black to move. There are 160 on the full board (80 with the pawn on files a–d); 92.5% of those 80 have the kings in opposition (73 direct, 1 diagonal), against 26.6% for a random legal king pair.
A6. What does triangulation achieve, and why can't a king achieve the same thing by moving back and forth between two squares?
Answer
Triangulation hands the move to the opponent while reproducing the same position. Walking a triangle of three mutually adjacent squares returns the king home after an odd number of moves; shuttling between two squares takes an even number, so the side to move does not change.
A7. What is an outside passed pawn, and why is its main value not that it queens?
Answer
A passed pawn far from the other pawns (usually on a rook or knight file). Its value is as a decoy: the defending king must go to stop it, and meanwhile the attacking king wins the pawns on the other wing. In the chapter's Ke3/a4/g4 vs Ke6/g5 example Black's king is even inside the a-pawn's square, yet every White move wins; without the a-pawn the position is a draw.
A8. Why is "DTZ" in a Syzygy answer not the number of moves to mate?
Answer
DTZ is distance to zeroing: the number of moves until the next capture or pawn move (the event that resets the 50-move counter) with best play. It answers "how soon does the win become irreversible", not "how soon is it mate" (that is DTM).
Part B — Positions ⭐⭐
B1. Endgame technique — White to move: win it.

♟️ Position: White Kd4, d2; Black Kd6 — White to move. FEN:
8/8/3k4/8/3K4/8/3P4/8 w - - 0 1
Which moves win and which only draw?
Answer
Syzygy and the chapter's bitbase agree: 1.Ke4, 1.Kc4 and 1.d3 win; 1.Ke3, 1.Kd3 and 1.Kc3 draw. The king two ranks in front of its pawn is on a key square of the d2-pawn (c4, d4, e4 — and d5). Stepping sideways keeps it there; 1.d3 uses the spare tempo at once. Retreating gives Black the chance to take the opposition in front of the pawn.
B2. Endgame technique — Black to move: can Black hold?

♟️ Position: White Kc3, c2; Black Kc5 — Black to move. FEN:
8/8/8/2k5/8/2K5/2P5/8 b - - 0 1
Answer
No. Every Black move loses (Syzygy: loss, DTZ −8; bitbase: win for White in 24 plies). The kings are in direct opposition and it is Black's move, so White has it; whichever side Black steps to, White's king outflanks on the other side and reaches b4/c4/d4. It is the chapter's basic opposition position moved two files to the left. Had it been White to move, it would be a draw.
B3. Analyze this position — White to move.

♟️ Position: White Kc1, c2; Black Ke1 — White to move. FEN:
8/8/8/8/8/8/2P5/2K1k3 w - - 0 1
Is this won? Does it matter what White plays?
Answer
Won, and every legal move wins (Kb2, Kb1, c3 and c4 all leave Black lost; the fastest win reaches promotion in 9 plies). Black's king is inside the pawn's square but White's king on c1 controls d1 and d2, so the black king cannot get to the pawn by the direct route: a shouldering position. The rule of the square is right only when the attacking king is out of play.
B4. Endgame technique — White to move: can White keep winning chances?

♟️ Position: White Kd1, b2; Black Kb3 — White to move. FEN:
8/8/8/8/8/1k6/1P6/3K4 w - - 0 1
Answer
No: it is a draw whatever White does (Ke2, Kd2, Ke1, Kc1 all draw). 1.Kc1 saves the pawn, but Black's king is already in front of it, and a king in front of the pawn on the 3rd rank holds against a pawn on the 2nd. Compare with the key squares of b2: a4, b4, c4 and b5 — White's king is nowhere near them, and Black's king stands between.
B5. Analyze this position — White to move.

♟️ Position: White Ka7, a5; Black Kf2 — White to move. FEN:
8/K7/8/P7/8/8/5k2/8 w - - 0 1
A rook pawn, and White's king is standing in front of it. Draw?
Answer
No — won with every move (Syzygy; the bitbase gives 7 plies to promotion for the fastest win). Rook pawns draw when the defending king reaches the corner or the square in front of the pawn. Here Black's king is four or more moves from c7/c8 and cannot trap White's king; White can step aside (Kb6, Kb7, Kb8) and push, or even push first. Lesson: "rook pawn = draw" is a statement about the defender's king, not about the pawn.
B6. Endgame technique — White to move: can White's king catch the pawn?

♟️ Position: White Kg2; Black Kd1, b5 — White to move. FEN:
8/8/8/1p6/8/8/6K1/3k4 w - - 0 1
Check the rule of the square first, then decide.
Answer
The square says yes: the b5-pawn needs four moves to b1, White's king is five king moves from b1 and is to
move, so in_square returns True. The tablebase says no — every White move loses (Syzygy: loss,
DTZ −2). Black's king on d1 shoulders: it controls c2, d2 and e2, and White's king, coming from g2, must
take the long way round. This is the chapter's shouldering idea (15.5) with colours reversed.
B7. Analyze this position — White to move.

♟️ Position: White Ke2, d2; Black Kd4 — White to move. FEN:
8/8/8/8/3k4/8/3PK3/8 w - - 0 1
Answer
A draw with every move (Kf3, Kf2, Kf1, Ke1, Kd1, d3 all draw). Black's king already occupies one of the d2-pawn's key squares as a defender: it stands in front of the pawn, and White's king cannot reach c4, d4, e4 or d5. A king that gets in front of the enemy pawn early is the simplest defence there is.
B8. Analyze this position — White to move.

♟️ Position: White Ke4, e5; Black Kf7 — White to move. FEN:
8/5k2/8/4P3/4K3/8/8/8 w - - 0 1
White has a pawn on the 5th. Is it a win?
Answer
No — a draw with every move (Syzygy; bitbase). The e5-pawn's key squares are d6, e6, f6, d7, e7 and f7. Black's king already stands on f7 and covers e6, f6 and e7; White's king is behind its pawn and cannot reach any key square before Black's king takes the square in front of the pawn with the opposition. The pawn ran ahead of its king. Compare with B1, where the king led and the pawn followed.
B9. Build the plan — White to move.

♟️ Position: White Ke3, h3; Black Ke5, a5, h4 — White to move. FEN:
8/8/8/p3k3/7p/4K2P/8/8 w - - 0 1
Answer
White is lost: every move loses (Syzygy: loss, DTZ −2). Black's plan is the outside passed pawn in reverse colours: ...a4–a3 drags White's king to the a-file, then Black's king walks to g3 and takes h3, after which the h-pawn queens. White's king cannot be in two places — the same decoy that won for White in the chapter's Ke3/a4/g4 example. Material is "only" one pawn, but in a pawn ending a distant passer is often a decisive pawn.
Part C — Data & Code ⭐⭐–⭐⭐⭐
C1. Engine analysis — the square by pawn rank. ⭐⭐ Extend code/03_rule_of_square.py: group the
DataFrame df by pawn rank (2–7) and by wk_dist, and print the "inside → drawn" accuracy for each cell.
Expected output: a 6 × 7 table of percentages with counts. Question to answer: is the rule more
reliable for pawns far from promotion (more time for the attacking king to be irrelevant?) or close to it?
C2. Engine analysis — key squares for Black. ⭐⭐ Write derived_key_squares_black(pawn) by mirroring
the board vertically (square ^ 56) and calling pe.derived_key_squares. Check that for Black's g5-pawn
(the hook) it returns f3, g3, h3. Expected output: one line per Black pawn square on files a–d,
ranks 7–2, and a count of squares where the textbook rule (pe.key_squares(p, chess.BLACK)) agrees.
C3. Engine analysis — triangulation hunting. ⭐⭐⭐ pe.solve_locked_structure accepts any locked
structure and a terminal_value(fen) function. Write a terminal function that calls
chessdata.tablebase(fen) for positions with ≤ 7 pieces and falls back to engine.evaluate(fen,
depth=16) otherwise, and run it on three asymmetric structures of your own (each must pass the
"really locked" check: no pawn can push or capture). For each, print the number of tempo-loss positions
(won with either side to move, White-to-move needing ≥ 5 more plies). Verify any hit with Syzygy before you
believe it. Expected shape: one summary line per structure, plus the hit positions as FENs.
C4. Database research — conversion by eval threshold. ⭐⭐ Load code/ch15_kp_games.parquet. For
thresholds of 2, 3, 5 and 8 pawns on pe_eval (from the side ahead's view), print the side ahead's win
rate for OTB, Lichess blitz and Lichess bullet. Expected output: a 4 × 3 table. Question: does the gap
between OTB and bullet close as the advantage grows?
C5. Database research — the king-centrality effect, controlled. ⭐⭐⭐ In equal-pawn pawn endings the
side with the more central king scored more (15.9). Fit a logistic regression of White's result (win vs
not) on the centrality edge and the clipped eval at the start of the pawn ending (pe_eval, OTB and
Lichess separately; random_state=0). Expected output: two coefficient tables. Question: does the
centrality edge still matter once the engine's evaluation is known? (If not, what does that tell you about
what the eval already "knows"?)
C6. Engine analysis — race() against the tablebase. ⭐⭐⭐ Generate 300 random legal K+P vs K+P
positions with both pawns passed (seeded), compute pe.race(board)["first_to_queen"], and compare with the
Syzygy verdict (≤ 4 pieces; pace your requests — the probe is cached). Expected output: a confusion table
(counter says White first / Black first × tablebase win / draw / loss for White) and three example FENs
where the count is misleading. Describe what the counter missed in each.
C7. Database research — the ten-move tail. ⭐⭐ Using ch15_kp_games.parquet, compute the share of
pawn endings in which the biggest one-move swing (pawn_biggest_drop) is ≥ 40 win-% points, by set and
band. Expected output: a table like part A of out_07.txt. Compare it with the "≥ 1 blunder" shares in
the chapter (13.9% OTB classical … 32.8% Lichess bullet).
Part D — Judgment & Transfer ⭐⭐⭐
D1. You are a 1200-rated player, a pawn up in a rook ending, and you can trade rooks into a pawn ending with the extra pawn. The chapter's data say the side a pawn up wins 71.9% of OTB pawn endings but only 65.1% on Lichess blitz/rapid, while a pawn-up rook ending converts worse. What should you check in the 30 seconds before trading, and when would you refuse the trade?
Answer (one good version)
Check three things: (1) can my king reach the key squares of the passed pawn I will create, or does the defender's king get in front first; (2) is my extra pawn an outside passer or a rook pawn (outside: trade; rook pawn with the enemy king near the corner: think twice); (3) count any races. Refuse when the enemy king is closer to the key squares or the corner, or when you cannot count the race now — the data say pawn endings flip in 25–33% of online games, so if you cannot see the win clearly, the rook ending (where mistakes are slower to punish) may be the practical choice.
D2. At FIDE 2400+ the side a pawn up in a pawn ending wins only 43.9% of games. At 1600–1799 it wins 80.4%. Does that mean masters are worse at pawn endings? Give two better explanations.
Answer
No. (1) Selection: strong players trade into a pawn ending a pawn down only when they know it is a draw (rook pawns, opposition, fortress), so the pawn-up positions that occur at 2400+ are more often theoretical draws. (2) Defence: strong defenders hold drawn positions, and strong attackers accept a draw instead of over-pressing. The per-move error data confirm masters blunder less in pawn endings (1.2 per 100 undecided moves at 2400+ vs 5.5 at 1600–1799).
D3. An engine shows −2.77 at depth 24 in a twelve-piece pawn ending; at depth 30 it shows −5.47. Your student says: "it's only −2.77, so it's not decided." What do you tell them?
Answer
Pawn endings are binary — won or drawn — and a modest number usually means the engine has not seen the race that decides it yet. The depth change proves it here (Ed. Lasker–Capablanca 1915, after 31.bxc4). Search deeper or count the races yourself; with ≤ 7 pieces, use the tablebase instead.
D4. The chapter found that won pawn endings are converted 94.6% OTB but 73.7% in Lichess bullet, almost independently of rating. If you mainly play blitz, what training follows from that?
Answer
Speed of recognition, not depth of knowledge: drill the standard positions (opposition, key squares, square, outside passer, rook-pawn corner) until you can classify them at a glance; practise KPK and simple races against a training partner or a tablebase with a short clock; and in blitz, prefer pawn endings you can count quickly over ones that need long calculation.
D5. "A king on a key square wins." Give two situations from this chapter where a king on a textbook key square does not win, and say what the honest version of the rule is.
Answer
(1) Knight pawn on the 6th: with Kf7 and a pawn on g6 against Kh8, Black to move is stalemated. (2) Rook pawns on the 2nd–4th rank: Kb7 with a pawn on a4 still draws if Black's king can reach c3, c4 or c5 and win the pawn. Honest version: "with the pawn safe and stalemate excluded, a king on a key square wins whoever moves" — and for knight and rook pawns, check stalemate and the corner.
Part M — Mixed / Interleaved ⭐⭐–⭐⭐⭐
M1. (with Chapter 2) A queenside majority (three pawns against two on the a–c files) is called a long-term asset in Chapter 2. Using this chapter, explain exactly how it becomes decisive in a pawn ending. Which position in this chapter shows the mechanism?
Answer
The majority creates a passed pawn far from the kings — an outside passer. In a pawn ending that passer decoys the enemy king while your king wins pawns on the other wing (15.8: Ke3/a4/g4 vs Ke6/g5; in practice Judit Polgar–Gomez Esteban 2003, where the b-pawn won after 54.Kxb4).
M2. (with Chapter 10) Chapter 10 recommended checks, captures and threats as candidate moves. In the hook position (Black: Kf5, g5; White: Ke2; Black to move) none of the eight moves is a check or capture. How should a calculation tree for pawn endings be built instead?
Answer
By targets and counts: list the key squares (f3, g3, h3), list the king moves that approach them, and for each count the replies that keep the defender's king between (the opposition). The tree is narrow — two of eight moves survive — but the candidates are chosen by geometry, not by force.
M3. (with Chapter 13) Chapter 13 measured blunder rates rising as the clock runs low. Combine that with the conversion data of 15.9: if you have 90 seconds left in a rook ending a pawn up, should you trade into a pawn ending you believe is winning?
Answer (judgment)
Only if you can see the win now — a short race, a key square reached, an outside passer the opponent cannot stop. Pawn endings punish one wrong tempo, and the bullet data (73.7% conversion of clearly won pawn endings) show what time pressure does to them. If the win needs long counting, keeping the rooks may be safer.
M4. (with Chapter 14) Chapter 14's K+P vs K table and this chapter's bitbase are independent implementations. Name two numbers that agree between them, and one thing this chapter's version adds.
Answer
Both find 76.5% of White-to-move positions won and agree with Syzygy on random samples (50/50 in Chapter 14, 60/60 here). This chapter adds the grading of rules: mutual zugzwangs and their link to the opposition (92.5%), textbook vs exact key squares (11/15), and the accuracy of the square by attacking-king distance.
M5. (with Chapter 6) Chapter 6 fitted piece values from real positions. Why would a "value of one pawn" fitted on pawn endings alone be much larger than 1.0 in score terms?
Answer
Because with no pieces left there is no compensation for a pawn (no activity, no attack), and the extra pawn often becomes a passed pawn that ties down a king. The data in 15.1 show it: one pawn up converts 71.9% in OTB pawn endings vs 58.4% in endgames generally (equal pieces).
Part E — Research & Extension ⭐⭐⭐⭐
E1. KPPK and KPKP by computer. Extend Outpost's retrograde solver to K+P vs K+P with free pawns (no blocking). The state space is about 2 × 64 × 64 × 48 × 48 — around 19 million slots — so you will need numpy throughout and a careful child generator. Validate on 100 random positions against Syzygy. Then report the mutual zugzwangs and how many are opposition positions. Does 92.5% survive with a second pawn?
E2. Who throws away pawn endings — and when? Using ch15_kp_games.parquet and the clocks in the
movetext (chessdata.parse_movetext gives clock_s), relate the pawn-ending blunders to the remaining
clock, by band and speed. Is the bullet conversion gap (15.9) explained by time left, or do bullet players
blunder pawn endings even with time on the clock?
E3. A pawn-ending trainer. Build a small command-line trainer on top of pawn_ending_report and
kpk_best_moves: it draws random KPK positions (stratified so that half are mutual-zugzwang neighbours),
asks the user for a move, and grades it with the bitbase. Log the user's accuracy by position type
(opposition, square, rook pawn) and report which type is weakest after 100 positions.