Tablebases - Endgame Databases (WDL, DTM, DTZ)
Tablebases
Definition
Tablebases are exhaustive databases that contain the exact outcome of chess endgame positions with a limited number of pieces on the board. For every legal configuration in their scope, they specify whether perfect play leads to a win, draw, or loss, and often how many moves it takes to force that result from the given position. They are computed by retrograde analysis, working backward from checkmate and stalemate positions to derive perfect play for every preceding position.
What They Contain (and Key Metrics)
Different tablebases store different kinds of information. Common metrics include:
- WDL (Win/Draw/Loss): Tells you whether the side to move can force a win, draw, or will lose with perfect play, respecting the 50-move rule.
- DTM (Distance To Mate): The number of moves until checkmate with perfect play, typically ignoring the 50-move rule. Classic Nalimov and Lomonosov bases report DTM.
- DTZ (Distance To Zeroing move): The number of plies until a capture or pawn move (which resets the 50-move counter). Syzygy tablebases use DTZ (and DTZ50) to align with real game rules.
Well-known families include Ken Thompson’s early bases, Nalimov (5- and 6-man DTM), Lomonosov (first full 7-man DTM), and Syzygy (WDL + DTZ, widely used by engines today). Six-man sets take tens of gigabytes; seven-man sets run to many terabytes, so they are often accessed over the network.
How Tablebases Are Used
In practice, tablebases are a cornerstone of modern chess analysis:
- Engine probing: Engines consult tablebases in late endgames to play perfectly, instantly pruning the search tree to optimal moves.
- Adjudication: In correspondence chess (e.g., ICCF), results can be claimed directly from tablebase proof. Some online platforms also use tablebases to adjudicate “dead drawn” or trivially won positions.
- Training and study: Players use tablebases to check whether a technique is correct, to discover precise winning plans or fortress holds, and to explore resource-rich defensive setups such as stalemate tricks and Zugzwang motifs.
- Endgame evaluation: Coaches rely on tablebases to validate classical endgame rules like the Lucena/Philidor rook endings, and to refine or overturn long-held beliefs in rare piece configurations.
Strategic and Historical Significance
Tablebases revolutionized endgame theory by proving—or disproving—centuries-old heuristics. They formally confirmed wins such as K+B+N vs K (mate in up to 33 moves), exposed narrow defensive resources in difficult endings (e.g., R+B vs R), and revealed that some “theoretically won” positions require extremely long maneuvers if the 50-move counter is not reset. Notably:
- Practicality vs. theory: Some positions are technically winning in DTM but are drawn under the 50-move rule unless a capture or pawn move occurs. Syzygy’s DTZ50 metric aligns with real-game constraints, helping engines avoid chasing wins that can’t be executed without a reset.
- Zugzwang and fortresses: Tablebases precisely identify zugzwang positions and verify true Fortress constructions that even strong engines might mis-evaluate without probing.
- Influence on engine design: From the 1990s onward, engines integrated tablebases to avoid endgame blunders. For example, Deep Blue (Kasparov vs. Deep Blue, 1997) used 5-piece endgame databases to steer late games flawlessly.
- Limits: Full 8-man tablebases are beyond current public computation/storage. Seven-man sets already demonstrate “astronomical” complexities, with theoretical mates stretching well beyond 500 moves in DTM—far exceeding the 50-move constraints unless resets occur.
Examples and Notable Positions
- K+B+N vs K: Universally winning with perfect play, but requires precise technique (herding the king to the corner of the bishop’s color). Tablebases confirm the longest forced mates are in the low 30s of moves—manageable over the board, but still punishingly exacting.
- R+B vs R: A notoriously tricky ending. Tablebases show that many positions are drawn, but a subset are winning with long, precise maneuvers featuring zugzwang motifs. Practical defense includes the Cochrane Defense; practical wins often hinge on forcing zugzwang while avoiding perpetual checks.
- Two knights vs pawn (K+N+N vs K+P): Without a pawn, K+N+N vs K is a tablebase draw; with a pawn, some positions become winning for the knights (especially when the pawn is blockaded far enough up the board—related to the classical “Troitsky line”), a fact tablebases quantify exactly.
- Queen vs rook (Q vs R): Winning in theory from most positions, but practical conversion is hard. Tablebases map the “W-maneuver” and show which defensive setups collapse to forks and mating nets.
- Long DTM wins vs. the 50-move rule: There are 7-man positions that are “mate in well over 500 moves” in pure DTM. In a real game those are draws unless the attacker can force a capture or pawn move to reset the counter.
Descriptive example 1 (R+B vs R win idea): White: Kg5, Rf6, Be6; Black: Kg7, Rb5; White to move. Tablebases reveal a pathway that triangulates with the rook and bishop, forcing zugzwang to expose the black king to mating nets or decisive forks. A human plan: improve your king, pin deflecting squares with the bishop, and aim to corner the king so that checks run out.
Descriptive example 2 (Q vs R skewer idea): White: Kf3, Qe4; Black: Kg7, Re7; White to move. The winning motifs include driving the king to the edge and forcing the rook onto a square where a check forks king and rook. Tablebases confirm exactly which tempi and king squares preserve the win.
Working With Tablebases in Analysis
- Respect the 50-move rule: Prefer DTZ50/WDL readouts for practical evaluations. A “+M250” (mate in 250) in DTM is often a draw in actual play unless you can create a reset (capture or pawn move).
- Learn the motifs, not just the moves: Use tablebases to extract patterns—opposition, shouldering, stalemate nets, and zugzwang—so you can reproduce the ideas at the board without needing exact sequences.
- Check fortress claims: If you suspect a fortress, tablebases will definitively tell you whether the position is unbreakable or if a hidden zugzwang breaks through.
- Use engine + tablebase probing: Modern engines automatically probe Syzygy WDL/DTZ. Watch for sudden evaluation flips near the 50-move threshold and plan resets when possible.
Interesting Facts and Anecdotes
- Deep Blue’s safety net: Even in 1997, IBM’s Deep Blue used 5-piece tablebases to avoid late-game blunders against Kasparov (Kasparov vs. Deep Blue, 1997).
- Record-long wins: Seven-man tablebases uncovered positions with theoretical mates far beyond 500 moves in DTM, highlighting the difference between “pure theory” and playable reality under FIDE rules.
- Corrections to classics: Many composed studies and “accepted truths” have been confirmed, refined, or overturned by tablebases—sometimes revealing unexpected underpromotions or brilliant stalemate ideas that humans had missed.
- Correspondence chess: In ICCF events, tablebase-supported claims can end games immediately, making endgame technique a matter of recognition rather than calculation.
Related Terms
See also: Endgame, 50-move rule, Zugzwang, Fortress.