Case Study 2 — Theory Against Practice: Queen and Pawn Against Queen in 588 Real Games
Setup
The question. Q+P vs Q is the queen ending in its simplest form: five pieces, fully solved by the tablebase. Every position has an exact answer. So we can ask something that is impossible for most of chess: when real players reach this ending, how often does the result match the truth — and who goes wrong, the attacker or the defender?
The data. From the book's data snapshot we took every game whose final position had queens only (plus pawns) and seven or fewer pieces, replayed it, and kept the first stable position of exactly king, queen and pawn against king and queen (stable: the next move is not a capture, so we never catch a queen in the middle of being traded). That gave 363 OTB games from the broadcast database (FIDE-rated, mostly classical) and 225 Lichess games at blitz, rapid and classical speed (Lichess Glicko-2 ratings). Because the tablebase API is rate-limited, we probed a fixed random sample: 150 OTB and 80 Lichess positions (seed 18). Each position was probed with a fresh 50-move count (halfmove clock reset to zero), so that the verdict describes the position, not how long the players had already been shuffling.
Code. code/03_queen_endings_practice.py (replay with three worker processes, tablebase probes, the main table and Figure 5) and code/case_study_02.py (the splits by level, speed and pawn type below).
The data
The headline comparison, from the side that has the pawn:
| Pool | Tablebase verdict | n | Pawn side won | Drawn | Pawn side lost |
|---|---|---|---|---|---|
| OTB | win | 35 | 74.3% | 22.9% | 2.9% |
| OTB | draw | 113 | 28.3% | 69.9% | 1.8% |
| Lichess | win | 26 | 73.1% | 11.5% | 15.4% |
| Lichess | draw | 50 | 30.0% | 48.0% | 22.0% |
(Two OTB and four Lichess positions were tablebase losses for the side with the pawn — the defender's king and queen were already better placed.)

📊 Figure (described): For OTB Q+P vs Q positions, stacked bars show the actual results for the side with the pawn, split by the tablebase verdict: about three-quarters of theoretical wins were won, and more than a quarter of theoretical draws were also won. The right-hand panel shows the much closer agreement for K+Q vs K+R.
Splitting by level (average rating; note the small cells):
OTB (FIDE bands): n = 150
theoretical WIN for the pawn side: theoretical DRAW:
level drawn lost won n level drawn lost won n
<1800 33.3 0.0 66.7 6 <1800 90.9 0.0 9.1 11
1800-2199 33.3 8.3 58.3 12 1800-2199 68.5 3.7 27.8 54
2200+ 12.5 0.0 87.5 16 2200+ 59.5 0.0 40.5 37
by speed: share of games where the result matched the tablebase verdict
blitz n= 21 result = theory in 61.9%
classical n=104 result = theory in 72.1%
rapid n= 23 result = theory in 73.9%
Lichess: share of games where the result matched the tablebase verdict
blitz n= 55 result = theory in 54.5%
rapid n= 24 result = theory in 66.7%
And by the type of pawn, pooling both sources:
n tb_win won
bishop pawn 41 51.2 46.3
centre pawn 36 52.8 55.6
knight pawn 70 21.4 42.9
rook pawn 83 7.2 27.7
Analysis
1. Most real Q+P vs Q positions are draws. 113 of 150 OTB positions (75%) were theoretical draws. The ending is reached far more often with the pawn back on its second to fourth rank than near promotion (18.3: 12–24% theoretical wins on ranks 2–4, 61–70% on ranks 6–7), and with rook pawns most of all (83 of 230 positions, only 7.2% of them theoretical wins). The textbook image of Q+P vs Q — a pawn on the seventh with the king sheltering — is the exception in practice.
2. The defenders go wrong more than the attackers. In OTB play the pawn side converted 74.3% of its theoretical wins, but it also won 28.3% of theoretical draws. Translate that into games: of the 35 wins, about 9 were not converted; of the 113 draws, 32 were lost by the defender. In this ending the burden of accuracy falls on the defender, who must find a correct check, or a correct king move, every single move, while the attacker can try one idea after another.
3. Strong attackers squeeze harder. At 2200+ FIDE the pawn side won 40.5% of theoretical draws (n = 37) and converted 87.5% of theoretical wins (n = 16); below 1800 the same figures were 9.1% (n = 11) and 66.7% (n = 6). The cells are small — read them as "much more" and "much less", not as precise rates — but the direction is clear: a strong player with the extra pawn keeps the defender under pressure for a long time, and long defences fail.
4. Online, the ending becomes a lottery. On Lichess the result matched the tablebase in only 54.5% of blitz games (n = 55), and the defender of a theoretical draw won 22.0% of the time (n = 50). With seconds on the clock, the attacking king walks into forks and the attacking side oversteps. OTB classical play matched the tablebase 72.1% of the time (n = 104).
5. The pawn's file matters as much as its rank. Centre and bishop pawns were theoretical wins about half the time in our sample (52.8% and 51.2%); knight pawns 21.4%; rook pawns 7.2%. That echoes the queen-vs-pawn rule of 18.2 — the rook pawn is the defender's friend — although here the knight pawn is not especially good for the attacker — probably because in Q+P vs Q the defending queen, not a stalemate trick, does most of the defending.
Two control comparisons
A theory-versus-practice gap means little without a baseline. Two other endings in the same data give one.
K+Q vs K+R (no pawns). The same script found 170 OTB and 128 Lichess games that reached a stable K+Q vs K+R position and probed samples of 100 and 60. In OTB play the queen side had a theoretical win in 94 of 100 positions and converted 92.6% of them (7.4% drawn, none lost); on Lichess it converted 83.3% of 54 theoretical wins and lost 11.1%. Queen against rook is a technique ending: long (Exercise B8 needs 45 plies to mate) but systematic, with a method that can be learned — push the king to the edge, separate rook from king, fork. Q+P vs Q has no comparable recipe, and the agreement between theory and practice is correspondingly worse (74.3% of theoretical wins converted OTB).
Endings that hit the 50-move rule. At the other end of the scale are the endings where the rules, not the players, decided. Among OTB drawn games that ended with the halfmove clock at 100 or more and seven or fewer pieces (285 games), a random sample of 60 final positions contained 13 (21.7%) that were still wins with a fresh count, mostly rook and bishop against rook and king, bishop and knight against king. Those games did not end in a draw because someone blundered into one at the end; they ended because one side had no pawn left to push and no capture to make, and fifty moves were not enough. Q+P vs Q almost never ends that way: the pawn itself is a clock-resetting resource, and the queens leave the board long before fifty quiet moves pass.
Put the three together and the picture is consistent. The more systematic the technique (K+Q vs K+R), the closer practice comes to theory. The more the result depends on finding the one right move among dozens of checks (Q+P vs Q), the further practice drifts — in both directions. And in pawnless endings with very long wins, theory is overruled by the rules themselves.
What it means (and doesn't)
It means the queen ending's reputation is earned twice over: it is drawish in theory and unpredictable in practice. If you reach Q+P vs Q as the defender, the theoretical draw is a promise only if you can keep finding the checks; if you reach it as the attacker, a theoretical draw is still worth playing on — strong players won 40% of them.
It does not mean that a quarter of tournament games are "decided wrongly". These are endings deep in long games, often played with little time left; the tablebase is a judge with infinite time. And the samples are small — 150 and 80 positions, with some cells under 20 games — so the precise percentages will move with a larger sample. The ratings in the two pools are on different scales (FIDE and Lichess Glicko-2) and must not be compared band by band.
For your training. The practical conclusion is unusual for an endgame study: of the two roles, defending Q+P vs Q is the one worth drilling. Set up the theoretical draws from code/qp_vs_q_cases.csv against an engine or the tablebase, play the defending side at a slow time control, and count how many moves you survive before the verdict changes. The attacking side, by contrast, is mostly a matter of patience — keep trying ideas, and the data say the defender will often crack first.
Discussion questions
- Why might defenders make more result-changing errors in Q+P vs Q than attackers? Think about what each side must calculate on every move.
- The 2200+ attackers won 40.5% of theoretical draws. Is that evidence of better technique, of more stubbornness (playing on longer), or of opponents' fatigue? What data would separate those explanations?
- Rook pawns were theoretical wins only 7.2% of the time. Using 18.2, explain why a rook pawn is hard to win with even when the defender has a queen instead of only a king.
- On Lichess, blitz results matched the tablebase in only 54.5% of games. What practical advice would you give a 1600 blitz player who reaches this ending as the defender? As the attacker?
- How would you design a study to measure whether training Q+P vs Q (for example, with tablebase drills) improves practical results?
Your turn
Extend code/case_study_02.py:
- Add the halfmove clock at the end of each game (from
game_features.final_fen) and test whether theoretical wins that ended drawn were more often drawn by the 50-move rule (clock ≥ 100) than by agreement or repetition. - For the theoretical draws that the defender lost, replay each game with the tablebase from the first Q+P vs Q position to the end and record the ply where the verdict first changed — then classify the defender's mistake (king walked into a cross-check, stopped checking, allowed a queen trade, or something else).
- Repeat the headline table with the full 363 OTB games instead of the sample of 150 (the tablebase cache will make reruns cheap once you have probed them) and report how much the percentages move.