57 min read

Thursday night at the Hartwell library. Lena Ortiz has her laptop open on the corner table and she is grinning,

Chapter 14 — Essential Endgames: The Positions Every Player Must Know — King and Pawn, Rook Endings, and Theoretical Draws

Thursday night at the Hartwell library. Lena Ortiz has her laptop open on the corner table and she is grinning, which is unusual for a post-mortem. "Look at this one," she says. "I didn't panic."

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

The game is a ten-minute rapid game with no increment. Lena, rated 1340 on Lichess, has White against a 1157. After a long queen-and-pawns middlegame the board has emptied out, and with 112 seconds left on her clock she reaches this position, White to play her 67th move:

Lena's game, White to play move 67

♟️ Position: White Kg2, Qf8, f2, h3; Black Kb3, Qa3 — White to move. FEN: 5Q2/8/8/8/8/qk5P/5PK1/8 w - - 29 67

White has two extra pawns. With queens on, though, an extra pawn or two is not the end of the story: the black queen can check the white king for a long time, and every check is a chance for White to go wrong. There are only six men on the board, which means this position is in the endgame tablebase — a complete, precomputed database that knows the exact result of every position with seven or fewer men under perfect play. We asked it. The verdict is a win for White, with mate forced 27 plies (half-moves) away — but of White's 28 legal moves, only 14 keep the win. Half the moves on the board throw away the full point. Stockfish 19 agrees about the best move and is very sure about the result: +7.53 (Stockfish 19, depth 18) and +8.46 (Stockfish 19, depth 24) after 67.Qxa3+.

Lena played 67.Qxa3+. After 67...Kxa3 the board looks like this:

After 67.Qxa3+ Kxa3: the pawn race

♟️ Position: White Kg2, f2, h3; Black Ka3 — White to move. FEN: 8/8/8/8/8/k6P/5PK1/8 w - - 0 68

Now count the tablebase's winning moves again: all nine of White's legal moves win. The black king is on a3; the h-pawn needs five moves to promote; once it has played h4, the yellow region on the diagram — the square of the pawn — is out of the black king's reach. Lena pushed the h-pawn five times, the tablebase approved every move (we checked each one), and the pawn became a queen on move 72.

What happened next is just as instructive. From the position after 72.h8=Q, the tablebase says mate can be forced in 16 plies (eight moves). Lena took 40 plies, played the cute underpromotion 82.f8=R along the way (the tablebase rates it mate in 6 plies against mate in 4 for the queen — harmless), and mated on move 92 with 97 seconds still on her clock. Her technique in the queen ending was slow; her decision on move 67 was perfect.

"I used to think trading queens when I was ahead was cowardly," Lena says. "Then I realised the pawn race was something I could just count."

That sentence is the whole chapter. Endgame knowledge is not a list of curiosities to memorise for the last five minutes of a game. It is the knowledge that tells you, while there is still plenty of material on the board, which positions you can count — which ones are won, drawn or lost no matter how cleverly anyone plays — and therefore which exchanges to seek and which to avoid. In this chapter we build that knowledge on the smallest number of reference positions that carry the most weight: king and pawn against king, the two great rook-ending positions (Lucena and Philidor), the rook behind the passed pawn, and the theoretical draws that save half-points every day. Every one of them is verified with the tablebase, and we will also build a small tablebase of our own, so the word stops being magic.

♟️ Improver Track: Sections 14.2–14.6 are the core: opposition, key squares, Lucena, Philidor and the rook-pawn draws. Play through every diagram and do every 📋 exercise on a real board. The summary table at the end is the page to keep.

📊 Analyst Track: Sections 14.1 and 14.8 measure how often real games reach these endings and how often real players get them wrong — including a complete K+P vs K solver run against every relevant game in our data.

🏆 Competitor Track: Read 14.4–14.6 and 14.8 with a clock in mind: which of these positions can you play with 30 seconds left? The data on theoretical draws that were lost in practice is your argument for drilling.

💻 Developer Track: The Project Checkpoint adds outpost/tablebase.py — tablebase probes, a line checker that grades your moves against perfect play, a verified library of essential positions, and an offline K+P vs K solver built by retrograde analysis.


14.1 Why the endgame is where knowledge pays

How often do real games get there?

Start with the boring question, because the folklore answer is wrong. You will often hear that "about a quarter of games reach an endgame". Whether that is true depends entirely on what you call an endgame, so this book uses one definition everywhere.

📐 Definition: book endgame. A position is in the endgame once the combined non-pawn material of both sides — knights and bishops 3, rooks 5, queens 9 — is 26 or less (it is 62 at the start). A pure endgame is an endgame with no queens. "Reaches an endgame" means at any point in the game.

Twenty-six points is, for example, a rook and a bishop each plus a knight-for-bishop pair (5+3+3 per side = 22) or a queen and a rook each (28 — not yet an endgame) after one more exchange. It is a generous definition, and with it the endgame is not rare at all:

Share of games reaching a book endgame, by rating band

📊 Figure (described): The share of games that reach a book endgame, by the average rating of the two players. Lichess blitz climbs steadily from 45.4% below 1200 to 60.3% at 2400+; Lichess rapid from 41.9% to 60.0%; over-the-board classical games sit around 62–71% in every band. The stronger the players and the slower the game, the more often the endgame decides it.

The full numbers from our data: 51.5% of Lichess blitz games (n = 394,946, weighted to the 4-million-game sample) and 48.4% of Lichess rapid games reach a book endgame; in over-the-board (OTB) classical games from the broadcast database it is 63.0% (n = 236,556). The reference figures across all speeds are 51.8% for Lichess and 63.3% for OTB, and the queenless "pure endgame" is reached in 38.7% and 52.2% of games respectively. More than half of all serious games are decided — or not decided — in the phase this part of the book covers.

The rating gradient in online play is worth a second look. Below 1200, games more often end before the endgame — someone gets mated, drops a queen, or runs out of time in the middlegame. As ratings rise, players stop losing in the first 30 moves, and the game goes longer. In other words: the better you get, the more your results depend on the endgame. The endgame is not the part of chess you can postpone until you are good; it is the part that matters more the better you become.

What kind of endgame?

The next question is what material is on the board when the endgame begins. We take the first stable endgame position (the first one where the next move is not a capture, so we don't measure in the middle of an exchange) and classify its pieces:

Endgame families at the first stable endgame position

📊 Figure (described): For every band, what pieces are on the board at the first stable endgame position. Rooks together with minor pieces dominate (61.3% of Lichess blitz endgames, 66.7% of OTB classical ones); a queen is still on in 30.8% (Lichess blitz) and 22.7% (OTB); rooks-only and minor-piece-only endings are a few per cent each; pure pawn endings almost never appear at the start of the endgame (0.1%).

So the endgame almost never starts as a textbook ending. It starts as a messy position with rooks and minor pieces, and the textbook endings appear later, as pieces come off. That is why we also measured where games go after the endgame starts. Among games that reach a book endgame:

Pool passes through a pawn ending passes through a rook ending (rooks only) passes through R+P vs R
Lichess blitz (n = 203,860) 9.5% 16.9% 1.11%
Lichess rapid (n = 98,763) 10.0% 17.0% 1.27%
OTB classical (n = 149,105) 9.4% 21.2% 2.05%

About one endgame in ten turns into a pure king-and-pawn ending; about one in five (OTB) into an ending with only rooks; and one in fifty OTB classical endgames passes through the exact material of the Lucena and Philidor positions — rook and pawn against rook. Those percentages look small until you multiply them by the number of games you play. A club player with 300 OTB classical games over a few years will, on these rates, reach about 190 endgames, about 18 pawn endings, about 40 rook endings and about 4 positions with R+P vs R. Each of them is usually worth a full half-point.

Where do players lose centipawns?

The last piece of the "why" is about errors. The book's accuracy data measures average centipawn loss (ACPL — the average amount, in hundredths of a pawn, by which a player's moves fall short of the engine's best) separately by phase:

Pool and band opening ACPL middlegame ACPL endgame ACPL
Lichess blitz, <1200 62.4 113.5 69.5
Lichess blitz, 2400+ 15.9 53.4 55.1
OTB classical, <1200 26.9 70.0 44.0
OTB classical, 2400+ 7.2 18.7 21.2

Read the rows from weaker to stronger. In Lichess blitz the middlegame loss falls by more than half (113.5 → 53.4) while the endgame loss falls by about a fifth (69.5 → 55.1). In OTB classical play the 2400+ players lose more per move in the endgame (21.2) than in the middlegame (18.7). The endgame is where even strong players keep bleeding centipawns.

⚠️ Common pitfall: reading the table as "beginners play endgames better than middlegames". Endgame ACPL is measured on fewer, often simpler moves, and the ±1000-centipawn clip hides errors in positions that are already decided. Endgames also come late, when clocks are low. The fair reading is narrower: rating improvement shows up much more slowly in endgame accuracy than in middlegame accuracy — so the endgame is where a given amount of study has the most unclaimed ground to cover.

What a tablebase is — and why the engine is not one

📐 Definition: endgame tablebase. A database holding the exact game-theoretic value of every legal position with a given set of men (all positions with up to seven men, kings included, for the Syzygy tables completed in 2018). For each position it stores WDL (win/draw/loss for the side to move) and DTZ (distance to zeroing: the number of plies to the next capture or pawn move along a winning line, which is what the 50-move rule cares about). Some online tables also give DTM (distance to mate). A cursed win is a position that is won with unlimited moves but drawn under the 50-move rule; a blessed loss is its mirror.

A tablebase does not search. It is built backwards from the end — from every checkmate — by a process called retrograde analysis, and once built it simply looks the answer up. That makes it a different kind of thing from Stockfish. The engine searches forward and estimates; the table knows. In this chapter every constructed position is checked with the Lichess Syzygy service through the toolkit's chessdata.tablebase, and the endgame-specific statements ("this wins", "this is a draw", "this move throws the win away") come from those probes, not from memory.

🤖 Engine check: where the two disagree the tablebase wins, and it is instructive to see how. In section 14.6 we give Stockfish 19 a rook ending that the tablebase calls a win and a twin position, with only the rooks swapped, that it calls a draw. The engine scores them +5.33 and 0.00 (Stockfish 19, depth 24) — the right direction, and the right story in human terms (one rook is active, the other is stuck). But "+5.33" is not a proof, and "0.00" is not a guarantee; the table's "win" and "draw" are.

🔄 Check your understanding

  1. Why does this book's endgame definition produce a much higher "reaches the endgame" share than the folklore quarter?
  2. Lichess blitz games reach an endgame 45.4% of the time below 1200 and 60.3% at 2400+. Give one reason.
  3. What is the difference between DTZ and DTM, and which one does the 50-move rule care about?
Answer
  1. Because "non-pawn material ≤ 26" includes many positions with rooks and minor pieces still on the board — the folklore figure usually imagines bare pawn or single-piece endings. Always state the definition with the number.
  2. Weaker players more often end the game in the middlegame (mates, dropped pieces, time losses); stronger players survive longer, so more games reach the phase where material has been traded.
  3. DTZ counts plies to the next zeroing move (capture or pawn move); DTM counts plies to mate. The 50-move rule counts moves since the last zeroing move, so DTZ is the relevant one.

14.2 King and pawn against king: the foundation

Every endgame eventually turns into pawns racing for the eighth rank, and the simplest such ending — one king and one pawn against a lone king — contains three ideas you will use for the rest of your chess life: the square, the opposition and the key squares. Chapter 15 takes each of them much further; here we establish them and, unusually, prove them.

The rule of the square

📐 Definition: the square of the pawn. Draw a square on the board with one side running from the pawn to its promotion square. If the defending king, with the defender to move, can step inside that square, it catches the pawn; otherwise the pawn promotes without help from its own king. A pawn on its starting square counts as if it were one rank further on (it can advance two squares).

That is exactly what happened in Lena's game. After 68.h4, the square of the h-pawn runs from h4 to h8 and across to d4–d8. Black's king on a3, with Black to move, can reach b4 at best — two files short. The tablebase agrees with the geometry: every White move won, and the pawn walked in.

🔍 Why this works: the king and the pawn move at the same speed — one square per move — but the king can move diagonally. A king moving diagonally gains one file per move while also advancing one rank, so the only question is whether it can match the pawn rank for rank and arrive on the pawn's file by the promotion square. The square is just a drawing of that race: its diagonal is the king's fastest path.

The opposition

Now give the pawn its king. In the position below, White's king is in front of its pawn and the kings stand face to face with one square between them.

Opposition, White to move

♟️ Position: White Ke4, e3; Black Ke6 — White to move. FEN: 8/8/4k3/8/4K3/4P3/8/8 w - - 0 1

The same position, Black to move

♟️ Position: White Ke4, e3; Black Ke6 — Black to move. FEN: 8/8/4k3/8/4K3/4P3/8/8 b - - 0 1

The squares are identical. The only difference is whose turn it is — and that difference is a full point. The tablebase:

[ch14-pos-02-opposition-wtm] White Ke4, e3; Black Ke6 — White to move.
   tablebase: draw for the side to move -> 1/2-1/2 (DTZ 0, DTM 0); best Kd3
   moves: Kd3=draw, Kf3=draw, Kd4=draw, Kf4=draw
[ch14-pos-03-opposition-btm] White Ke4, e3; Black Ke6 — Black to move.
   tablebase: loss for the side to move -> 1-0 (DTZ -8, DTM -36); best Kd6
   moves: Kd6=loss, Kf6=loss, Ke7=loss, Kd7=loss, Kf7=loss

📐 Definition: opposition. Two kings stand in opposition when they are on the same file (or rank, or diagonal) with an odd number of squares between them — most often one. The side that has just moved into that position — the side not to move — "has the opposition".

With White to move, every White king move gives ground: Kd4 is met by ...Kd6, Kf4 by ...Kf6, and the black king keeps standing in front. With Black to move, Black must step aside, and the white king walks through to d5, e5 or f5. Here is a winning line from the Black-to-move position, every move checked against the tablebase:

Line check from the opposition position (Black to move):
   1...Kd6         1-0 -> 1-0      ok
   2.Kf5           1-0 -> 1-0      ok
   2...Ke7         1-0 -> 1-0      ok
   3.Ke5           1-0 -> 1-0      ok
   3...Kd7         1-0 -> 1-0      ok
   4.Kf6           1-0 -> 1-0      ok
   4...Ke8         1-0 -> 1-0      ok
   5.e4            1-0 -> 1-0      ok
   ...
   9.e6+           1-0 -> 1-0      ok
   9...Kf6         1-0 -> 1-0      ok
   10.e7           1-0 -> 1-0      ok

Notice 2.Kf5 — White does not chase the black king but goes around it, the move called outflanking — and notice that White does not push the pawn until the king has reached the sixth rank. The king clears the road; the pawn follows.

Key squares

The opposition is a means to an end. The end is a key square.

📐 Definition: key squares. For a given pawn, the squares that win for the attacker if his king stands on one of them, wherever the defending king is (as long as it cannot simply capture an unprotected pawn).

For a pawn on e4, the key squares are d6, e6 and f6. For a pawn on e3 they are d5, e5 and f5 — which is why the opposition fight above was a fight for those three squares. For a pawn on e5 they are the six squares d6–f6 and d7–f7. You can find these lists in every endgame book. We did not copy them. We computed them — see the next subsection — and the map below is what the computation produced for a pawn on e4.

Key squares for a pawn on e4, computed

📊 Figure (described): For a white pawn on e4 and Black to move, each square shows the percentage of Black king placements that lose when White's king stands there (placements where Black can just take an undefended pawn are excluded). Exactly three squares reach 100%: d6, e6 and f6 — the key squares. The squares beside the pawn on the fifth rank score 91%: very good, but not a guarantee.

Building our own K+P vs K tablebase

How do you prove a statement like "d6, e6 and f6 always win"? You check every position. There are not many: two kings and one pawn give a few hundred thousand legal arrangements. Our module solves all of them by retrograde analysis in a few seconds of pure Python. The core loop — the same idea that built the Syzygy tables, on a much smaller scale — looks like this (from project/outpost/tablebase.py):

# seeds: White to move with the pawn on the 7th and a safe promotion -> won (distance 1)
while queue:
    wk, bk, p, wtm = st = queue.popleft()
    d = dist[st]
    if wtm:
        # a won White-to-move state: every Black move that led here loses one "escape"
        for bk0 in _KN[bk]:                      # where could Black's king have come from?
            if bk0 == p or bk0 == wk or bk0 in _KNSET[wk]:
                continue
            key = (wk, bk0, p)
            if key not in counter or (wk, bk0, p, False) in win:
                continue
            counter[key] -= 1                    # one fewer non-losing reply for Black
            if counter[key] == 0:                # every Black move now loses
                s2 = (wk, bk0, p, False)
                win.add(s2); dist[s2] = d + 1; queue.append(s2)
    else:
        # a lost Black-to-move state: every White move that could have produced it wins
        for (a, b_, c) in predecessors_by_white_unmove(wk, bk, p):
            s2 = (a, b_, c, True)
            if s2 not in win and legal(s2):
                win.add(s2); dist[s2] = d + 1; queue.append(s2)

The logic is the whole of game theory in eight lines. A position with White to move is won if some move reaches a won position; a position with Black to move is lost if every move does. We start from the positions we know (a pawn about to promote safely), walk backwards, and keep a counter of Black's remaining escapes for each position. When the counter hits zero, Black is lost there too. Anything never reached is a draw. (A Black move that captures an unprotected pawn is an escape that can never be closed.)

The results, from code/01_kpk_oracle.py:

=== K+P vs K, complete table (pawn side = White) ===
legal positions, White to move: 163,328; won 124,960 (76.5%)
legal positions, Black to move: 168,024; won 97,604 (58.1%)
longest forced route to a winning promotion (White to move): 37 plies; median 5

Key squares for a White pawn on e3 (win against every Black king placement, Black to move): d5, e5, f5
Key squares for a White pawn on e4 (win against every Black king placement, Black to move): d6, e6, f6
Key squares for a White pawn on e5 (win against every Black king placement, Black to move): d6, e6, f6, d7, e7, f7
Key squares for a White pawn on a4 (win against every Black king placement, Black to move):

=== Verification against the Syzygy tablebase (Lichess API) ===
random sample (seed 2026): 50/50 positions agree with the tablebase; mismatches: []

Four things to take from this output. First, the classical key-square lists drop out of the computation exactly as the endgame books give them. Second, a pawn on a4 has no key squares at all — there is no square from which White's king wins against every defence — which is the rook pawn's famous weakness in one line. Third, the solver agreed with the real Syzygy tablebase on 50 random positions out of 50, which is the kind of check you should always run before trusting your own code. Fourth, the share of won positions depends on where you count from: 76.5% with White to move but only 58.1% with Black to move — the tempo matters across the whole table, not just in the opposition diagrams.

K+P vs K: share of won positions by pawn square

📊 Figure (described): For each pawn square, the share of all legal king placements (White to move) that are wins. Rook pawns are the weakest file on every rank (73.2% overall against 78.6% for the d- and e-pawns), and a pawn on the third rank is, oddly, slightly worse off than a pawn on the second (63.4% vs 66.7%) — the two-square first move makes the second-rank pawn faster.

⚠️ Common pitfall: quoting "76.5% of K+P vs K positions are won" as a practical statistic. It counts every legal arrangement equally, including absurd ones with the black king on the far side of the board. Games don't produce random arrangements. The practical question — how often real players win these endings — is in section 14.8, and the answer is different.

📋 Try it — Endgame technique: White: Kd5, pawn d4; Black: Kd7. Who wins with White to move, and who with Black to move? Name the key squares of the d4-pawn before you answer.

Answer

The key squares of a pawn on d4 are c6, d6 and e6. With White to move, 1.Kc5 or 1.Ke5 heads for them, but Black answers by taking the opposition (1.Kc5 Kc7, 1.Ke5 Ke7) and holds. With Black to move, Black must give way — 1...Kc7 2.Ke6 or 1...Ke7 2.Kc6 — and White's king reaches a key square: White wins. Check both with tablebase.kpk_result (the module's offline solver) or tablebase.probe. This is the same opposition fight as in the diagrams, one rank further up the board.

The rook pawn: the corner is a fortress

Rook pawn, defender in the corner

♟️ Position: White Kg5, h5; Black Kh8 — White to move. FEN: 7k/8/8/6KP/8/8/8/8 w - - 0 1

White to move here has eight legal moves and the tablebase rates every one of them a draw. If the white king comes to g6 or g7 to escort the pawn, Black is stalemated or simply shuffles between h8 and g8; if the king stays back, the black king never leaves the corner. A rook pawn cannot win against a king that reaches the queening corner in time, however well-placed the attacking king is. Our solver's map for a pawn on a4 (below) shows the same thing from every angle: no white king square reaches 100%. This single fact will reappear three times in this chapter: with a bishop (14.7), with a queen against a pawn on the seventh (14.7), and as the reason so many real "won" pawn endings are drawn (14.8).

Pawn on a4: no key squares

📊 Figure (described): The same computation as for the e4-pawn, for a rook pawn on a4 (Black to move; placements where Black can simply take the pawn excluded). No white king square wins against every black king placement — the best square, b7, reaches 94%, because a black king that reaches the a8 corner holds the draw.

🔄 Check your understanding

  1. In the opposition diagrams, the position with White to move is drawn and with Black to move is won. Which side "has the opposition" in each case?
  2. Why does the a4-pawn have no key squares?
  3. Our solver agreed with Syzygy on 50 of 50 random positions. Why is that check necessary even though the logic of the solver looks obviously right?
Answer
  1. With White to move, Black has the opposition (Black made the last move into the face-to-face position), so White must give way and Black draws. With Black to move, White has it, and Black must give way.
  2. Because whatever square White's king occupies, a black king that reaches the corner a8 (and the squares next to it) cannot be dislodged: the only way to evict it would cost a stalemate or abandon the pawn. No single king square wins against every defence.
  3. Because code that looks right is often subtly wrong — an off-by-one in the double pawn step, a forgotten stalemate, an illegal position counted as legal. An independent check on random cases is cheap and catches exactly those bugs — especially the rare cases, such as a promotion that stalemates or a new queen the defending king can capture at once.

14.3 The Lucena position: building a bridge

🧩 Productive struggle: before you read this section, set up the diagram below on a board (or look at it for three full minutes). White is a pawn up and the pawn is on the seventh rank, yet White's king is stuck on b8 and every king move is illegal. Find a plan that promotes the pawn. Write down your first three moves, then compare them with the tablebase line that follows. Most players' first idea is a king move; the tablebase's is not.

Rook endings are the most common pure endings in real play (section 14.1: one OTB classical endgame in five passes through one), and almost all rook-ending theory hangs off two positions with a rook and one pawn against a rook. The first shows how to win.

The Lucena position, White to move

♟️ Position: White Kb8, Rc1, b7; Black Kd8, Ra2 — White to move. FEN: 1K1k4/1P6/8/8/8/8/r7/2R5 w - - 0 1

📐 Definition: the Lucena position. Rook and pawn against rook, with the pawn on the seventh rank, the attacking king on the promotion square in front of it, the defending king cut off from the pawn by at least one file, and the defending rook checking from the side or waiting. The position is named after Luis Ramírez de Lucena, whose book on chess, printed around 1497, is among the oldest printed ones — although, by most historians' accounts, the position itself does not appear in it. The winning method is usually called building a bridge.

The diagnosis first. White's pawn is one step from queening; the only thing stopping it is White's own king on b8. The king cannot step out: a7 and a8 are covered by the black rook along the a-file, c7 and c8 by the black king. If White's king walks away from the black rook's checks, it has to walk far, and the pawn loses its protection. White needs two things: to push the black king further away, and to build a shelter for his own king against the rook checks. The tablebase confirms the position is won — DTZ 15, DTM 41 — and lists White's moves: twelve of the fourteen win; 1.Ra1 throws the win away (the rooks come off and the black king reaches the pawn); 1.Rc2 hangs the rook.

The bridge, checked move by move by tablebase.check_line:

   line check - building the bridge:
      1.Rd1+            1-0 -> 1-0      ok
      1...Ke7           1-0 -> 1-0      ok
      2.Rd4             1-0 -> 1-0      ok
      2...Ra1           1-0 -> 1-0      ok
      3.Kc7             1-0 -> 1-0      ok
      3...Rc1+          1-0 -> 1-0      ok
      4.Kb6             1-0 -> 1-0      ok
      4...Rb1+          1-0 -> 1-0      ok
      5.Kc6             1-0 -> 1-0      ok
      5...Rc1+          1-0 -> 1-0      ok
      6.Kb5             1-0 -> 1-0      ok
      6...Rb1+          1-0 -> 1-0      ok
      7.Rb4             1-0 -> 1-0      ok

Step by step:

  1. 1.Rd1+ drives the black king one more file away. Now c7 is free for White's king.
  2. 2.Rd4! is the key move. The rook goes to the fourth rank — the bridge. It does nothing visible yet.
  3. 3.Kc7 — the king steps out. Black checks: 3...Rc1+ 4.Kb6 Rb1+ 5.Kc6 Rc1+ 6.Kb5 Rb1+.
  4. 7.Rb4 — the bridge. The rook blocks the check on the b-file, and the checks are over.

The bridge is built

♟️ Position: White Kb5, Rb4, b7; Black Ke7, Rb1 — Black to move. FEN: 8/1P2k3/8/1K6/1R6/8/8/1r6 b - - 13 7

The tablebase scores this as mate in 20 plies; the pawn promotes next move.

🔍 Why this works: a rook checks along straight lines, so a king can only hide from it behind something. On the open board the only "something" White owns is his own rook. The fourth rank is chosen by counting: the king needs to walk down the board, alternating files, until the rook can interpose on the file the checks are coming from without being captured and without blocking its own pawn. Put the rook on the fourth rank and the king reaches the fifth rank in three moves, exactly when the rook is ready to block. Put the rook on the fifth rank and the king has no room to step out of the checks before the interposition; put it on the third and the king walks one move further than it needs to. You don't memorise "fourth rank"; you count the checks.

⚠️ Common pitfall: stepping out with the king before building the bridge. We played 1.Rd1+ Ke7 and then 2.Kc7 at once, ignoring the bridge, and asked the tablebase about each move:

   line check - 2.Kc7 at once, no bridge - the checks never stop:
      ...
      5.Kb5             1-0 -> 1-0      ok
      5...Rb2+          1-0 -> 1-0      ok
      6.Kc4             1-0 -> 1/2-1/2  ERROR
      6...Rc2+      1/2-1/2 -> 1-0      ERROR

For five moves nothing is lost — White can still go back and build the bridge — but there is no shelter, so the checks keep coming. The moment the white king wanders off towards c4, too far from the pawn, the tablebase calls the position a draw: Black now has time to attack b7. (Black returned the favour at once with 6...Rc2+?, an error that lets the white king back — but you will not always face such a generous opponent.) The lesson is the one every coach repeats: in the Lucena, the rook move comes before the king move.

🚪 Threshold concept: an endgame position is not "a pawn up" or "a pawn down"; it is won, drawn or lost, and the label is exact. Once you see endgames this way, the question at the board changes from "how much am I better?" to "which reference position am I heading for, and is it on the winning side of the line?" Every diagram in this chapter carries that label because a tablebase checked it.


14.4 The Philidor position: the third-rank defence

The second rook position shows how to draw — and it is, if anything, more important, because the defending side in R+P vs R is more often the one who has to know what to do.

The Philidor position, Black to move

♟️ Position: White Kf5, Ra7, e5; Black Ke8, Rb6 — Black to move. FEN: 4k3/R7/1r6/4PK2/8/8/8/8 b - - 0 1

📐 Definition: the Philidor position. Rook and pawn against rook where the defending king stands on the pawn's promotion square (or next to it) and the defending rook holds its third rank (the sixth rank for Black) to keep the attacking king out. François-André Danican Philidor analysed it in the eighteenth century.

The tablebase: draw. It also tells us how narrow the path is. Of Black's sixteen legal moves, eight hold the draw (the rook moves 1...Rb1, Rb2, Rb3, Rb4, Rc6, Rh6 and the king moves 1...Kd8, Kf8) and eight lose — including the natural-looking 1...Rb8, which retreats to the back rank, and 1...Rf6+, a check that walks into trouble.

The method has two phases:

  1. While the pawn is on the fifth rank, keep the rook on the sixth (Black's third) rank. The white king cannot cross it to reach the sixth rank and support the pawn. Shuffle along the rank if you need a waiting move.
  2. The moment the pawn advances to the sixth, it has taken the sixth-rank squares away from its own king. Now swing the rook to the far end of the board and check from behind. The king has no shelter: the pawn on e6 no longer protects it from checks on the e-, d- or f-files.
   line check - third-rank defence, then checks from behind:
      1...Rc6       1/2-1/2 -> 1/2-1/2  ok
      2.e6          1/2-1/2 -> 1/2-1/2  ok
      2...Rc1       1/2-1/2 -> 1/2-1/2  ok
      3.Kf6         1/2-1/2 -> 1/2-1/2  ok
      3...Rf1+      1/2-1/2 -> 1/2-1/2  ok
      4.Ke5         1/2-1/2 -> 1/2-1/2  ok
      4...Re1+      1/2-1/2 -> 1/2-1/2  ok
      5.Kd6         1/2-1/2 -> 1/2-1/2  ok
      5...Rd1+      1/2-1/2 -> 1/2-1/2  ok
      6.Ke5         1/2-1/2 -> 1/2-1/2  ok
      6...Re1+      1/2-1/2 -> 1/2-1/2  ok

Checks from behind once the pawn reaches e6

♟️ Position: White Kf5, Ra7, e6; Black Ke8, Rc1 — White to move. FEN: 4k3/R7/4P3/5K2/8/8/8/2r5 w - - 1 3

🔍 Why this works: the defence works by making the attacker choose between two goods he cannot have at once. To win, White needs his king on the sixth rank in front of (or beside) the pawn and the pawn behind it. As long as the pawn stays on e5, the black rook on the sixth rank keeps the king out. As soon as the pawn goes to e6 to let the king in, the pawn itself occupies the shelter square; the white king can no longer hide from vertical checks, and there is nothing to interpose. Nothing about the position needs memorising beyond those two sentences.

The passive rook loses

Now watch what happens when Black gets it wrong. From the Philidor position, 1...Rb8? looks solid — the rook "guards the back rank" — but the tablebase marks it as the losing move:

   line check - the passive 1...Rb8? (rook to the back rank):
      1...Rb8       1/2-1/2 -> 1-0      ERROR
      2.Kf6             1-0 -> 1-0      ok
   tablebase line after 1...Rb8 2.Kf6: Rb1 Ra8+ Kd7 e6+ Kd6 Rd8+ Kc5 e7 Rf1+ Ke6 Re1+ Kd7

The white king reaches the sixth rank, the pawn follows with check, and the black king is driven away from the promotion square. Here is the same idea with White's king already on e6:

Passive defence: rook on the back rank

♟️ Position: White Ke6, Ra7, e5; Black Ke8, Rb8 — White to move. FEN: 1r2k3/R7/4K3/4P3/8/8/8/8 w - - 0 1

With White to move it is a win (DTM 45; the tablebase's first choice is 2.Kf6, threatening Ra8+ and e6). With Black to move it is still a draw — but only through one move, 1...Rb6+!, which activates the rook with check and gets it back to the third rank. One tempo separates a rook that defends from a rook that watches.

📋 Try it — Endgame technique: In the Philidor position above (Black to move), the tablebase says 1...Rb1 — checking from behind immediately, without waiting for e6 — also draws. Why does that work here, and why is "third rank first" still the rule you should learn?

Answer

It works because the white king is still on f5, not on the sixth rank: White has no immediate way to make progress, and the checks from behind can start early because the king has no shelter yet. But it is a position-specific exception. If White's king were already on the sixth rank (as in the passive-rook diagram), checking from behind would be too late, and the third-rank rook is exactly what prevents the king from getting there. The rule "third rank until the pawn advances, then check from behind" works in every Philidor-type position; "check from behind at once" works only in some. Learn the rule; use the tablebase to discover the exceptions.

🔄 Check your understanding

  1. In the Lucena, why is 2.Rd4 played before the king steps out to c7?
  2. In the Philidor, what is the signal that tells the defender to switch from the third rank to checks from behind?
  3. Of Black's sixteen moves in the Philidor diagram, how many draw — and what do the losing moves have in common?
Answer
  1. Because once the king steps out, the black rook checks it from the side, and the only shelter is the white rook interposing on the fourth rank (7.Rb4). Without the bridge, the checks never stop.
  2. The pawn's advance to the sixth rank: from then on the attacking king has no shelter from vertical checks.
  3. Eight draw. Of the eight that lose, three leave the third rank (1...Rb5, 1...Rb7, 1...Rb8) and five put the rook on a sixth-rank square where it is simply captured — by the a7-rook (1...Ra6), the e5-pawn (1...Rd6, 1...Rf6+) or the king (1...Re6, 1...Rg6). The third rank is right; which square on it still matters.

14.5 The masters and the reference positions

How do great players handle these endings? We replayed 18,746 games from the PGN Mentor collections of eight great endgame players — Lasker, Capablanca, Rubinstein, Smyslov, Fischer, Karpov, Judit Polgar and Carlsen — and found 330 games that pass through R+P vs R and 169 that pass through K+P vs K (code/05_master_search.py). For the games in which at least ten more plies were played we asked the tablebase (or our solver) for the exact verdict:

kpk: 28 games; result matches theory in 96.4%; theory draw 25, theory win 3
rpr: 137 games; result matches theory in 86.1%; theory draw 89, theory win 48

(The R+P vs R probes cover the games before 1990 plus Carlsen's and Polgar's collections, to keep the requests to the public server modest; the collections also contain rapid, blitz and simultaneous games.) Two games show the two faces of the subject.

Classic: Capablanca–Menchik, Hastings 1929

Vera Menchik, the first Women's World Champion (from 1927), played for years in the strongest tournaments of her time. Against Capablanca at Hastings 1929 she reached a rook ending that was a theoretical draw from the moment it entered the tablebase (move 44) and stayed one through the R+P vs R position after 52.f5:

42...Kg7 43.Kg5 Rxe3 44.Rxg6+ Kf7 45.Rf6+ Kg7 46.Rb6 Re1 47.Rb7+ Kg8 48.Kf6 e3 49.Rb8+ Kh7 50.Re8 Rb1
51.Rxe3 Rxb4 52.f5 Rb8 53.Kf7 Rb7+ 54.Re7 Rb6 55.f6 Ra6 56.Rd7 Ra8 57.Re7 Ra6 58.Kf8+ Kg6 59.f7 Ra8+
60.Re8 Ra7 61.Re6+ Kh7 62.Ke8 Ra8+ 63.Ke7 Ra7+ 64.Kf6 1-0

Capablanca–Menchik, Hastings 1929: R+P vs R, White to move

♟️ Position: White Kf6, Re3, f4; Black Kh7, Rb4 — White to move. FEN: 8/7k/5K2/8/1r3P2/4R3/8/8 w - - 0 52

The tablebase: draw, and almost every White move keeps it so (19 of 21; only 52.Re4 and 52.Rb3 lose, both by allowing the rooks to come off on bad terms). Black's rook is active on the long side of the board, her king sits in front of the pawn's path on the h-file, and the white king has no shelter. Then, on move 55, with the pawn on f6 and the white king on f7:

Capablanca–Menchik: Black to play move 55

♟️ Position: White Kf7, Re7, f6; Black Kh7, Rb6 — Black to move. FEN: 8/4RK1k/1r3P2/8/8/8/8/8 b - - 0 55

   moves: Rb1=draw, Rb2=draw, Rb3=draw, Rb4=draw, Rb5=draw, Rb8=draw, Kh6=draw, Ra6=loss, Rc6=loss, Rd6=loss,
          Kh8=loss, Rxf6+=loss, Re6=loss, Rb7=loss

Every rook move along the b-file except 55...Rb7 draws (so does 55...Kh6); 55...Ra6? loses. The reason is a single geometric fact. White threatens Kf8, uncovering a check from the rook on e7 along the seventh rank, followed by f7. On the b-file, Black's rook can answer that with ...Rb8+ along the eighth rank. On a6 it cannot. Capablanca did not see it either: 56.Rd7? (only 56.Kf8+! wins) gave the draw back, and the ending swung four more times before it was over —

   55...Ra6      1/2-1/2 -> 1-0      ERROR
   56.Rd7            1-0 -> 1/2-1/2  ERROR
   57...Ra6      1/2-1/2 -> 1-0      ERROR
   62.Ke8            1-0 -> 1/2-1/2  ERROR
   63...Ra7+     1/2-1/2 -> 1-0      ERROR

After 55...Ra6: White to move, only 56.Kf8+ wins

♟️ Position: White Kf7, Re7, f6; Black Kh7, Ra6 — White to move. FEN: 8/4RK1k/r4P2/8/8/8/8/8 w - - 1 56

Five result-changing errors in nine moves, by one of the greatest endgame players in history and the strongest woman player of her era. We do not know the clock situation — the 1929 game record has no clock times — but the lesson stands on its own: R+P vs R positions where the pawn has reached the sixth rank are knife-edge, and the side to move often has a single safe file or rank. Black needed her rook where it could still check along the eighth rank.

Classic: Lasker–Steinitz, World Championship 1896

The second game shows the other face: a long draw that the defender let slip once, and a world champion who then converted perfectly. From the moment the ending reached seven men (move 54) it was a theoretical draw. On move 65 Steinitz had one move that held:

Lasker–Steinitz 1896: Black to play move 65

♟️ Position: White Kc4, Rb3, g3, b4; Black Kc6, Rd5, f5 — Black to move. FEN: 8/8/2k5/3r1p2/1PK5/1R4P1/8/8 b - - 6 65

The tablebase lists seventeen legal moves; only 65...Rd8 draws. Steinitz played 65...Re5?, and every one of Lasker's remaining thirteen moves was graded "ok" by the tablebase: 66.b5+ Kb6 67.Kd4 Re4+ 68.Kd5 Re8 69.Kd6 Re1 70.Rf3 Kxb5 71.Rxf5+, reaching a R+P vs R in which Black's king is cut off far from the g-pawn:

Lasker–Steinitz: R+P vs R, Black to move

♟️ Position: White Kd6, Rf5, g3; Black Kb5, Re1 — Black to move. FEN: 8/8/3K4/1k3R2/8/6P1/8/4r3 b - - 0 71

The tablebase: White wins, mate 60 plies away with best play, and every Black move loses. This is the practical meaning of "cut off": the black king on the b-file is three files from the g-pawn, the white rook on the f-file keeps it there, and Black's rook alone cannot stop a pawn escorted by its king. Lasker gave back his b-pawn (70...Kxb5) to reach exactly this position — trading a pawn for a known win.

Modern: the World Cup ending

Among the 34 classical broadcast games between two 2600+ players that passed through R+P vs R in our data, the recorded result matched the tablebase verdict 33 times. The exception, Le Quang Liem–Donchenko at the FIDE World Cup 2025, is the subject of Case Study 1: Black had a winning R+P vs R with an h-pawn and, at move 69 with about two minutes on his clock, stepped his king away from the pawn (69...Ke2?) instead of towards it. White then found one of the only three drawing moves.

🤖 Engine check: before the Capablanca–Menchik ending reached seven men, Stockfish 19 rated the start of the rook ending (Black to play move 42) at +0.32 (depth 20) and +0.17 (depth 24) — a small edge for White. Nothing in those numbers says "knife-edge". That is the limit of an evaluation: it summarises a position in one number, while the tablebase later showed that the result depended on single moves. When a rook ending gets down to seven men, stop trusting the centipawns and start asking for the verdict.

⚠️ Common pitfall: concluding from 86.1% that "masters get R+P vs R right 86% of the time". Our master collections mix classical games with rapid, blitz and simultaneous games, the R+P vs R probes cover a subset of players and years, and the result can match the theory by accident (two errors that cancel, as in Capablanca–Menchik). The robust statement is narrower: even the greatest players made result-changing errors in these endings, and the tablebase pinpoints them to the move.

🔄 Check your understanding

  1. In Capablanca–Menchik, what did 55...Ra6? allow that every rook move along the b-file (except Rb7) prevented?
  2. Why was Lasker's 70...Kxb5 position winning although material was "only" rook and pawn against rook?
  3. Why do we grade master games only from the first position with seven men or fewer?
Answer
  1. 56.Kf8+, a discovered check from the rook on e7, followed by f7: on the b-file the black rook could meet it with a check along the eighth rank.
  2. Because Black's king was cut off on the b-file, three files from the g-pawn, by White's rook on the f-file; a cut-off king cannot help its rook stop a pawn escorted by its own king.
  3. Because only then is the tablebase exact. Before that we have engine estimates (useful, but not verdicts).

14.6 Rook activity and Tarrasch's rule

The Lucena and the Philidor share a moral: the active rook — checking, cutting off, guarding a rank from a distance — beats the passive one. The cleanest demonstration is a pair of positions with identical pawns and identical kings, in which only the rooks change places.

White's rook behind the passed a-pawn

♟️ Position: White Kg2, Ra1, h3, a5; Black Kg7, Ra8, h6 — White to move. FEN: r7/6k1/7p/P7/8/7P/6K1/R7 w - - 0 1

The same pawns, rooks reversed

♟️ Position: White Kg2, Ra8, h3, a5; Black Kg7, Ra1, h6 — White to move. FEN: R7/6k1/7p/P7/8/7P/6K1/r7 w - - 0 1

Both positions have seven men, so the tablebase has the final word:

[ch14-pos-11-tarrasch-behind] ... tablebase: win for the side to move -> 1-0 (DTZ 1, DTM None); best a6
[ch14-pos-12-tarrasch-reversed] ... tablebase: draw for the side to move -> 1/2-1/2 (DTZ 0, DTM None); best h4
   b-pawn, rook behind: 1-0
   b-pawn, rooks reversed: 1/2-1/2

Same pawns, same kings, same side to move; one is a win and the other a draw. We repeated the test with the passed pawn on the b-file instead of the a-file and got the same split. This is Tarrasch's rule — "rooks belong behind passed pawns", usually attributed to Siegbert Tarrasch — in its most convincing form.

🔍 Why this works: a rook behind its own passed pawn gains scope with every pawn advance: on a1 behind a5 it already controls a2–a4, and after a6 it controls a2–a5. A rook in front of the pawn loses scope with every advance and ends up a doorstop on a8, unable to leave without dropping the pawn. On the defending side, a rook in front of the enemy pawn (Black's Ra8 in the first diagram) is reduced to blockading, while a rook behind the enemy pawn (Black's Ra1 in the second) attacks it and stays free to check. Activity is not a style preference; it is the number of squares the rook can still use.

🤖 Engine check: Stockfish 19 does not have the tablebase in our set-up, so it has to search these positions:

   Stockfish 19 depth 16: r7/6k1/7p/P7/8/7P/6K1/R7 w - - 0 1 -> cp 461 mate None  pv a6 Ra7 Kf3 Kf6 h4 Ke7
   Stockfish 19 depth 24: r7/6k1/7p/P7/8/7P/6K1/R7 w - - 0 1 -> cp 533 mate None  pv a6 Ra7 Kg3 Kg6 Ra5 Kf7
   Stockfish 19 depth 16: R7/6k1/7p/P7/8/7P/6K1/r7 w - - 0 1 -> cp 6 mate None  pv Kf3 Ra4 a6 h5 Ke2 Ra3
   Stockfish 19 depth 24: R7/6k1/7p/P7/8/7P/6K1/r7 w - - 0 1 -> cp 0 mate None  pv Ra6 Ra2+ Kf3 Ra4 Kg3 h5

That is +4.61 (depth 16) / +5.33 (depth 24) for the rook behind the pawn and +0.06 / 0.00 for the rooks reversed. The engine gets the story right — a big, growing advantage in one case; nothing in the other — but its number for the winning position is not "mate in N"; it is a confident estimate. The human translation is simple: in the first position White's rook protects the pawn from behind and keeps the black rook tied to a8, so White's king is free to walk to the queenside, win the black rook or support the pawn, while Black's king cannot leave the h-pawn. In the second, White's king has nowhere useful to go: if it walks towards a7, the black rook checks it from behind and the black king takes White's kingside pawn.

The a7-rook: the most common drawn rook ending

The "rooks reversed" position leads to a configuration you will meet again and again in Chapter 16: the attacker's rook in front of its pawn on a8, the pawn on a7, the defender's rook behind it, and the defender's king near g7.

Rook in front of its a7-pawn

♟️ Position: White Kg3, Ra8, a7; Black Kg7, Ra2 — White to move. FEN: R7/P5k1/8/8/8/6K1/r7/8 w - - 0 1

The tablebase says draw, with either side to move. The g7 and h7 squares are the only safe ones for Black's king, because there the white rook cannot leave a8 with a check that would also clear the a-file. Move the black king just one square, to f6, and everything changes:

King on f6: the skewer

♟️ Position: White Kg3, Ra8, a7; Black Kf6, Ra2 — White to move. FEN: R7/P7/5k2/8/8/6K1/r7/8 w - - 0 1

   a7 set-up, Black to move, king g7: 1/2-1/2 (best Ra1)
   a7 set-up, king on f6 instead (White to move): 1-0 (best Rf8+)

With the king on f6, 1.Rf8+! leaves the a-file with check: Black has no time to take the a7-pawn, and next move the pawn promotes; if the black rook captures the new queen on a8, White's rook recaptures along the eighth rank. With the king on g7 or h7 the white rook has no such check, and any rook move off a8 drops the a7-pawn to ...Rxa7. One square of king placement decides the game. That is what "essential endgame" means: the difference between the two diagrams is not a matter of judgement; it is a fact you can learn once and use for life.

📋 Try it — Endgame technique: In the a7 position with Black's king on g7, the tablebase's best Black move is 1...Ra1 (Black to move). Why does Black's rook stay on the a-file instead of checking White's king?

Answer

Because the rook's job is to keep attacking the a7-pawn from behind, so White's rook can never leave a8 without losing the pawn. Checks are only useful if they win something; here they would let White's king approach the queenside (towards b6 or b7) to free the rook. Black's rook waits on the a-file, the king shuffles g7–h7, and White has no way to make progress. (Checking is the right idea once White's king comes close to the pawn — then the black rook drives it away from behind.)


14.7 Theoretical draws — and the wins that look like draws

The last group of essential positions is about material that looks sufficient and isn't, or looks insufficient and is. Each of them saves or wins half-points in real games, and each is decided by geometry you can see in a second once you know where to look.

Not enough to mate

   K+B vs K: python-chess insufficient material = True; tablebase 1/2-1/2 (DTM 0)
   K+N vs K: python-chess insufficient material = True; tablebase 1/2-1/2 (DTM 0)
   K+N+N vs K: python-chess insufficient material = False; tablebase 1/2-1/2 (DTM 0)
   K+B+B (opposite colours) vs K: python-chess insufficient material = False; tablebase 1-0 (DTM 31)

A lone bishop or knight cannot mate: a mating net needs to cover the king's square and its flight squares, and a single minor piece plus king cannot do both. Rules-wise these positions are draws by insufficient material automatically (python-chess reports is_insufficient_material() == True, and so do online platforms). Two knights are different: a checkmate with two knights exists (it can arise if the defender blunders), so the game is not over automatically, but it cannot be forced — the tablebase scores K+N+N vs K as a draw. Two bishops on opposite colours win (from our test position, mate in 31 plies — 16 moves).

⚠️ Common pitfall: playing on for a "win on time" when you have only a knight or bishop against a bare king. Under FIDE's Laws, if the opponent's flag falls but you have no possible way to checkmate — no sequence of legal moves at all — the game is a draw, not a win. The flip side surprises people: a lone knight can win on time if a checkmate is still possible on the board (for instance, when the flagged player has pawns that could block his own king). Online platforms implement their own versions of this rule, so learn the one for your platform and your federation; Appendix C sets out where FIDE and the online sites differ.

The bishop and the wrong rook pawn

Wrong-coloured bishop: draw

♟️ Position: White Kg6, Bd1, h6; Black Kh8 — White to move. FEN: 7k/8/6KP/8/8/8/8/3B4 w - - 0 1

Right-coloured bishop: win

♟️ Position: White Kg6, Bc1, h6; Black Kh8 — White to move. FEN: 7k/8/6KP/8/8/8/8/2B5 w - - 0 1

Bishop plus pawn against bare king — a full piece and a pawn up — and yet the first diagram is a dead draw: the tablebase rates all eight of White's moves as draws. The h8 square is dark; the bishop on d1 runs on light squares and can never control it. Black's king shuffles between h8 and g8 (or is stalemated) forever. Swap in the dark-squared bishop and the tablebase finds mate in three moves (five plies): 1.Ba3 Kg8 2.h7+ Kh8 3.Bb2#.

📐 Definition: wrong rook pawn. A rook pawn (a- or h-pawn) whose promotion square is the opposite colour from the attacking side's bishop. With bishop and wrong rook pawn against a king that reaches the promotion corner, the position is a draw.

The rule only bites if the defender's king reaches the corner. With the kings far away and the h-pawn on h4 (White's bishop still the wrong colour), the tablebase says White wins — the pawn simply runs before the black king arrives. With an a-pawn and the black king able to reach a8 in time, it is a draw again. So the practical lesson is two-sided: as the defender, race to the corner; as the attacker, keep the king out of it or don't enter this ending at all. This is also the endgame version of a decision you make in the middlegame: when you trade pieces with an extra rook pawn, ask which bishop you are keeping.

Bishop and knight: the hard win

K+B+N vs K

♟️ Position: White Ke1, Bc3, Nd3; Black Ke6 — White to move. FEN: 8/8/4k3/8/8/2BN4/8/4K3 w - - 0 1

King, bishop and knight against king is a forced win — the tablebase gives this position DTZ 57 and DTM 57: 57 plies, or 29 moves, of perfect play from a central position. The mate can only be forced in a corner of the bishop's colour (here a1 or h8, the dark corners). It is the hardest of the "basic" mates, and it occurs rarely enough that many strong players have never had it on the board. It belongs in this chapter for one reason: 29 moves of perfect play is uncomfortably close to the 50-move limit, so a player who knows the method wins and a player who improvises often doesn't.

Queen against a pawn on the seventh

The last reference group is a favourite of tournament arbiters, because it decides so many games in the last minutes. A queen beats a lone pawn — usually. Here the white king is far away on g8 and Black's pawn is on the seventh rank, supported by its king.

Queen vs c-pawn on the seventh

♟️ Position: White Kg8, Qh1; Black Kb2, c2 — White to move. FEN: 6K1/8/8/8/8/8/1kp5/7Q w - - 0 1

Queen vs d-pawn on the seventh

♟️ Position: White Kg8, Qh1; Black Kc2, d2 — White to move. FEN: 6K1/8/8/8/8/8/2kp4/7Q w - - 0 1

The tablebase: the c-pawn is a draw, the d-pawn is a win (DTM 47), and the a-pawn version is a draw again. Against a centre or knight pawn, White checks until the black king is forced to stand in front of its own pawn, uses that tempo to bring the white king one step closer, and repeats. Against a bishop or rook pawn, the trick fails, because the defender has a stalemate resource:

The stalemate trick against the c-pawn

♟️ Position: White Kg8, Qb3; Black Ka1, c2 — White to move. FEN: 6K1/8/8/8/8/1Q6/2p5/k7 w - - 8 5

After 1.Qe4 Kb1 2.Qb4+ Ka2 3.Qc3 Kb1 4.Qb3+ Ka1!, the black king walks into the corner and leaves the pawn hanging: 5.Qxc2 is stalemate (our script confirms is_stalemate() == True). White never gets the tempo needed to bring the king up. Against the rook pawn the same idea works with the king in front of the pawn on a1. The drawing rule has an exception, and the tablebase found it for us: bring White's king close enough — we tried c4, d3 and b4 — and the c-pawn ending is a win again, because the white king arrives in time to support a mate.

🔄 Check your understanding

  1. Why is K+N+N vs K not drawn automatically, while K+N vs K is?
  2. In the wrong-rook-pawn diagram, what single change of material would turn the draw into a win?
  3. Why does the stalemate trick work against a c-pawn but not against a d-pawn?
Answer
  1. With two knights a checkmate position exists (it can arise if the defender cooperates), so the game is not over by rule — but it cannot be forced against correct defence, which is why the tablebase calls it a draw. With one knight no checkmate position exists at all.
  2. A bishop that controls h8 — a dark-squared bishop — as in the second diagram (mate in three moves).
  3. Against a c-pawn, the defending king can go to the corner (a1) next to the pawn, so capturing the pawn leaves it without moves — stalemate. Against a d-pawn there is no corner next to the pawn: the king is forced to block its own pawn on d1, which gives White the tempo to approach with the king.

14.8 Theory versus practice: what real players do with the essential endings

A tablebase tells us what should happen. Our data can tell us what does. For K+P vs K we can do this completely, because our solver answers instantly and offline: we replayed every game in the data whose final position has three men or fewer (13,817 Lichess and 6,293 OTB games), stopped at the first K+P vs K position, looked up its exact value, and compared it with the recorded result. For R+P vs R we used the online tablebase on a random sample (seed 2026) of 150 OTB classical and 150 Lichess blitz/rapid games.

for (src, gid), v in res.items():           # first K+P vs K position of each game (parallel replay)
    ply, fen = v
    k = tb.kpk_result(fen)                   # exact verdict, offline, microseconds
    rows.append({"source": src, "game_id": gid, "kpk_fen": fen,
                 "theory": k["result_white"], "pawn_side": k["pawn_side"]})
...
kp["theory_pawnside"] = np.where(kp.theory == "1/2-1/2", 0.5, 1.0)
kp["actual_pawnside"] = np.where(sgn > 0, score_white, 1 - score_white)

K+P vs K

games that reached K+P vs K: 11,796 (Lichess 7,923, weighted 37,197; OTB 3,873)

Lichess bullet: n=1,429
   theoretically WON for the pawn side: 69.6% of K+P vs K games (n=977) -> pawn side won 70.6%, drew 29.4%, lost 0.0%; result differs from theory 29.4% (of which decided on time: 20.4%)
   theoretically DRAWN: 30.4% of K+P vs K games (n=452) -> pawn side won 19.6%, drew 80.4%, lost 0.0%; result differs from theory 19.6% (of which decided on time: 16.8%)

Lichess blitz/rapid: n=6,494
   theoretically WON for the pawn side: 64.0% of K+P vs K games (n=4,093) -> pawn side won 79.6%, drew 20.4%, lost 0.0%; result differs from theory 20.4% (of which decided on time: 8.2%)
   theoretically DRAWN: 36.0% of K+P vs K games (n=2,401) -> pawn side won 13.0%, drew 87.0%, lost 0.0%; result differs from theory 13.0% (of which decided on time: 5.2%)

OTB (all speeds): n=3,873
   theoretically WON for the pawn side: 47.7% of K+P vs K games (n=1,849) -> pawn side won 98.0%, drew 1.5%, lost 0.5%; result differs from theory 2.0%
   theoretically DRAWN: 52.3% of K+P vs K games (n=2,024) -> pawn side won 1.6%, drew 98.1%, lost 0.2%; result differs from theory 1.9%

(Lichess percentages are weighted to the full 4-million-game sample; "decided on time" counts mismatches where the game ended by time forfeit. A "loss" for the pawn side in OTB games is a recording artefact or a forfeit — a lone king cannot win.)

Three findings stand out.

Online, one K+P vs K ending in five goes the "wrong" way. In Lichess blitz and rapid, a fifth of theoretically won positions (20.4%) were not won, and 13.0% of theoretically drawn positions were lost by the defender. Time explains only part of it (8.2 and 5.2 percentage points). The rest are real errors: a pawn pushed too early, the opposition handed over, a defending king that walked away from the pawn's file.

Over the board, almost nobody gets it wrong — or plays it out. OTB results differ from the verdict in only about 2% of games. Some of this is skill: our OTB players are mostly FIDE-rated tournament players with time to think. Much of it is also recognition: in OTB chess, a K+P vs K position that both players know is decided is usually ended at once by resignation or a draw agreement, so the recorded result reflects the players' knowledge of the verdict. Either way, the knowledge is there.

Theoretical drawing chances are larger than you think. Online, 36.0% of the K+P vs K positions that real games reach are theoretically drawn; OTB, 52.3%. Part of the reason is probably selection: defenders steer into K+P vs K when they can see it is drawn. Either way, if you are a pawn down in a pawn ending, the opposition and the rook-pawn corner are your lifelines.

K+P vs K: theory vs practice by band

📊 Figure (described): For each rating band, the share of theoretically drawn K+P vs K games that the pawn side nevertheless won (blue) and the share of theoretically won games that were not won (orange). Online, the defender's mistakes fall steadily with rating — from 15.6% below 1200 to 3.8% at 2400+ — while the attacker's failures fall from 34.0% below 1200 to around 13–20% from 1800 up. OTB, both bars stay near zero at every level.

The online band pattern is the most useful number in this chapter for an improving player. Below 1200 on Lichess blitz/rapid, a third (34.0%, n = 514) of theoretically won K+P vs K positions were not won. That is the single most common technical ending, decided by the single simplest idea in the chapter — the key squares — and a third of the wins slip away. By 1800–1999 that falls to 13.0%. You will not find a cheaper 20 percentage points anywhere in chess.

R+P vs R

R+P vs R: theory vs practice

📊 Figure (described): Random samples of 150 games per pool that reached R+P vs R, split by the tablebase verdict at the first stable R+P vs R position. OTB classical: theoretical draws held 88.4% of the time and theoretical wins converted 92.5%. Lichess blitz/rapid: theoretical draws held only 47.4% of the time (the pawn side won 39.2% and even lost 13.4%), and theoretical wins converted 73.1%.

R+P vs R sample, theoretical verdict at the first stable position (pawn side's view):
  OTB classical: n=150: win 35.3%; draw 63.3%; loss 1.3%
     theoretical draw (n=95): pawn side won 11.6%, drew 88.4%, lost 0.0%
     theoretical win (n=53): pawn side won 92.5%, drew 7.5%, lost 0.0%
  Lichess blitz/rapid: n=150: win 34.7%; draw 64.7%; loss 0.7%
     theoretical draw (n=97): pawn side won 39.2%, drew 47.4%, lost 13.4%
     theoretical win (n=52): pawn side won 73.1%, drew 23.1%, lost 3.8%

Two in three R+P vs R positions in real games are theoretical draws (63.3% OTB, 64.7% online), which fits the broader practical record: in the book's full OTB classical data, the side with the extra pawn in R+P vs R won 40.4% and drew 59.1% (n = 3,060). But online, a theoretical draw in R+P vs R is a coin flip for the defender — held less than half the time in our sample. These samples are small (95 and 97 drawn positions), so treat the percentages as rough — the 95% intervals are up to about ±10 points wide on each side — but the gap between OTB and online is far larger than the noise.

At different levels

Pawn endings one pawn up, by band

📊 Figure (described): Results of pawn endings in which one side is exactly one pawn up (first stable pawn ending). Online (Lichess blitz+rapid) the side ahead wins 57–69% in every band; over the board the win rate falls from 81.2% (FIDE 1400–1599) to 43.9% (2400+) while draws rise to 49.8% — strong defenders hold the drawn ones.

  • Below 1400 (online): your biggest endgame leak is K+P vs K, not rook endings — a third of won positions not won. Learn the square, the opposition and the key squares first; they are worth more points than any opening.
  • 1400–1900: pawn endings a pawn up convert reasonably online (64–67% wins), but R+P vs R is where the half-points go. The Philidor and the Lucena are your next investment.
  • 1900–2200 (OTB): the K+P vs K and R+P vs R basics are mostly solid; the extra pawn wins less often because defenders know the draws (pawn endings one pawn up: 73.3% at 1800–1999, 67.3% at 2000–2199). Your gains are in the endings before the reference positions — Chapters 15 and 16.
  • 2200+: at 2400+ OTB, a pawn ending one pawn up is won only 43.9% of the time and drawn 49.8%. Knowing which extra pawns are not enough is as valuable as knowing which are.

⚠️ Common pitfall: concluding from the OTB numbers that "OTB players never make endgame mistakes". The OTB rows measure games that were recorded to the end on a broadcast board, which skews towards titled and well-organised events, and many decided endings end by resignation or agreement the moment they arise. The online data, where games are played out to the last move, is the better measure of what players actually do at the board.

🔄 Check your understanding

  1. Why can a K+P vs K game never end in a win for the side without the pawn — and what does a recorded "loss" for the pawn side therefore indicate?
  2. Online, the defender's error rate in K+P vs K falls steadily with rating, while the attacker's failure rate stops falling after about 1800. Suggest one reason.
  3. Why did we use a random sample of 150 games for R+P vs R but every game for K+P vs K?
Answer
  1. A lone king has no mating material, so the pawn side cannot be checkmated; in online play a flag against a bare king is also scored as a draw. A recorded loss is a data artefact (a mis-entered result) or an off-board event such as a forfeit.
  2. Many theoretically "won" positions are won only by precise play on a fast clock, and the pawn side in blitz often has little time left when the endgame arrives; also, at higher ratings the pawn side more often accepts a quick draw in a messy position. The data cannot separate these explanations — that would need the clocks (Exercise C4).
  3. The K+P vs K verdict comes from our offline solver (instant, unlimited); R+P vs R needs the online tablebase, which is rate-limited, so a sample keeps the requests polite. The sample gives rough percentages with known uncertainty.

Spaced Review

Before you read the answers, try to answer each question from memory.

  1. From Chapter 6: piece values are averages over many positions. Which of this chapter's positions are the most extreme counter-examples — a material advantage of three points or more that is worth exactly nothing?
  2. From Chapter 13: what is a "practical" decision, and why did Lena's 67.Qxa3+ qualify as one even though it was also the objectively best move?
  3. From Chapter 2: a passed pawn is a structural asset. What did the Tarrasch pair in 14.6 add to that idea?
Answers
  1. K+B vs K and K+N vs K (a full piece up, a dead draw), K+N+N vs K (six points up, still no forced mate), and bishop plus wrong rook pawn (four points up, a draw if the king reaches the corner). Chapter 6's lesson was that the 1/3/3/5/9 scale is a good average but a bad law; in the endgame the exceptions become exact.
  2. A practical decision weighs how hard a position is to play, not just its evaluation — clock, risk, and the number of ways to go wrong. Before the trade, 14 of White's 28 moves kept the win; after it, all 9 did. With 112 seconds left, choosing the position with no losing moves is the essence of practical play — and here the practical choice happened to be the tablebase's first choice as well.
  3. That a passed pawn's value depends on the pieces around it, not just the pawn: with the same passed a-pawn, the rook behind it made the position a win and the rook in front of it made it a draw. Structure sets the potential; piece placement decides whether it is realised.

Project Checkpoint: tablebase

Dev has been watching Lena's post-mortem over her shoulder. "You checked every move of that pawn race by hand?" he asks. "No," says the narrator, "we checked it with the tablebase. And that is the next thing Outpost should do."

This chapter Dev adds project/outpost/tablebase.py, the endgame module of Outpost. Its public functions:

Function What it does
probe(fen_or_board) one tidy record: category, WDL (side to move and White's view), DTZ, DTM, best move
result_white(fen_or_board) theoretical result '1-0', '1/2-1/2' or '0-1' (cursed wins count as draws)
move_table(fen_or_board) every legal move with its verdict for the player who makes it
best_line(fen_or_board, plies) the tablebase's preferred continuation
check_line(fen_or_board, sans) grades a line of moves; flags each move that changes the result
ESSENTIAL_POSITIONS, library(), verify_library() this chapter's 21 reference positions, each verified
KPKSolver, kpk_solver(), kpk_result(board) a complete offline K+P vs K table built by retrograde analysis
summary(fen_or_board) a one-line plain-text verdict

Every probe goes through the toolkit's cached chessdata.tablebase — the one route to the network — with a memo for the session, an optional local copy (tablebase.LOCAL_CACHE, which this chapter's scripts point at code/tb_cache.json) and a short pause between uncached requests, because the public tablebase server is shared and rate-limited. The demo, code/project_checkpoint.py, grades Lena's pawn race and verifies the library:

1. summary() of the Lucena position
   White to move: win (WDL +2 for the side to move; theoretical result 1-0). DTZ 15, DTM 41. Best move: Rd1+.

2. check_line() on Lena's pawn race (composite game 284), moves 68-72
   68.h4           1-0 -> 1-0      ok
   68...Kb4        1-0 -> 1-0      ok
   69.h5           1-0 -> 1-0      ok
   69...Kc5        1-0 -> 1-0      ok
   70.h6           1-0 -> 1-0      ok
   70...Kd6        1-0 -> 1-0      ok
   71.h7           1-0 -> 1-0      ok
   71...Ke7        1-0 -> 1-0      ok
   72.h8=Q         1-0 -> 1-0      ok

3. verify_library()
                  key expected tablebase  dtz   dtm best   ok
   ...  (21 rows)
   21/21 verified

4. kpk_result() - offline, no network
   solver built in 2.4 s
   8/8/4k3/8/4K3/4P3/8/8 w - - 0 1: {'result_white': '1/2-1/2', 'pawn_side': 'white', 'plies_to_promote': None}
   8/8/4k3/8/4K3/4P3/8/8 b - - 0 1: {'result_white': '1-0', 'pawn_side': 'white', 'plies_to_promote': 20}
   K7/8/8/8/1k6/8/7P/8 w - - 0 1: {'result_white': '1-0', 'pawn_side': 'white', 'plies_to_promote': 9}
   K7/8/8/8/1k6/8/7P/8 b - - 0 1: {'result_white': '1/2-1/2', 'pawn_side': 'white', 'plies_to_promote': None}

How it plugs into later chapters: Chapter 15's opposition and key-square calculators are tested against kpk_result, so every rule a human can state is checked against the exact table. Chapter 16 uses probe and check_line to label real rook endings Lucena-, Philidor- or Vancura-type and to find the moment a won ending slipped. Chapter 18's conversion tables can split their "one pawn up" rows into theoretically won and drawn cases. And Chapter 26's game-review report calls check_line whenever a game reaches seven men, so the review of any endgame you play says not "−2.3" but "this move turned a win into a draw".


Chapter Summary

Position / idea Verdict (tablebase) The rule to remember
K+P vs K, defender's king in front of the pawn draw the defender holds with the opposition
Opposition (Ke4/e3 vs Ke6) White to move: draw; Black to move: win the side not to move has the opposition
Key squares e3 → d5/e5/f5; e4 → d6/e6/f6; e5 → d6–f7 get the king to a key square, then push
Rook pawn, defender in the corner draw (every move) the corner is a fortress
Lucena win (DTZ 15, DTM 41) Rd1+ to cut off, Rd4 to bridge, then block the checks
Philidor draw third rank, then checks from behind once the pawn advances
Passive rook on the back rank win for the attacker (White to move) a passive rook loses; ...Rb6+ saves only with the move
Rook behind the passed pawn vs rooks reversed win vs draw Tarrasch's rule
a7-pawn, rook in front, defender's king g7/h7 draw the king on f6 loses to Rf8+
K+B / K+N / K+N+N vs K draw no forced mate
Bishop + wrong rook pawn draw if the king reaches the corner check the colour of the queening square
K+B+N vs K win (DTM 57 plies) mate only in a corner of the bishop's colour
Q vs c- or a-pawn on the 7th, attacking king far draw stalemate trick in the corner
Q vs d-pawn on the 7th win (DTM 47 plies) check until the king blocks its pawn, then approach

Decision checklist: count the men; name the ending you are trading into; draw the square; find the key squares; in rook endings, make the rook active (behind the passer, on the third rank in defence, checking from distance); when the clock is short, choose the position you know.

What's Next

Chapter 15 takes the king-and-pawn ideas of section 14.2 to their full depth — distant opposition, triangulation, outside passed pawns and breakthroughs — and builds calculators for them that are tested against this chapter's solver. Chapter 16 extends the Lucena and Philidor into the rook endings that real games actually produce, including the Vancura and R+2 vs R+1 positions, and Chapter 17 and Chapter 18 complete the part with minor-piece, queen and mixed endings.