Chess Tablebases
Chess, solved: up to seven pieces
A tablebase is a database containing the exact game-theoretic result (win, loss, or draw) of every possible position with a small number of pieces, plus a perfect move for each. For everything up to 7 pieces, the endgame is literally solved.
Updated
Play this ending (free)What a tablebase knows
Tablebases are built by retrograde analysis: start from every checkmate, then work backwards, labeling each position by its exact outcome with perfect play from both sides. The result is not an evaluation or a guess: it is the truth of the position.
The milestones: Ken Thompson's early 5-piece tables in the 1980s, Nalimov tables with distance-to-mate for 6 pieces, the Lomonosov 7-piece set in 2012, and the open-source Syzygy tables (Ronald de Man) that power modern engines and the Lichess tablebase API. Syzygy's 7-piece set covers over 423 trillion positions.
DTM, DTZ, and cursed wins
Two metrics matter. DTM (distance to mate) counts moves until checkmate. DTZ (distance to zeroing) counts moves until a capture or pawn move resets the 50-move counter, the metric that respects the 50-move rule.
The difference produces two strange categories. A cursed win is a position that is winnable in theory but needs more than 50 captureless moves, so the defender saves it under the rule; a blessed loss is the same thing seen from the defender's side. Serious training should use DTZ50 results; otherwise you are practicing wins that do not exist in real games.
Training against perfection
Playing endgames against a tablebase is a different sport from playing an engine. An engine at reduced strength makes random-feeling mistakes; a tablebase never errs and never gives up: it always plays the move that makes your task hardest, and it defends with the 50-move rule counting down.
That is the sparring partner this site aims at. Every drill here is played against an opponent tuned to resist rather than resign, on positions whose result is verified against the tablebase, and the moment you throw the win away it shows you the move that wins fastest, ranked by the tablebase itself: you learn immediately whether your “natural” move threw the win away, and why.
Questions
How many pieces can chess tablebases handle?
Complete tablebases exist for all positions with up to 7 pieces (counting both kings). The Syzygy 7-piece set covers more than 423 trillion unique positions. 8-piece tablebases are an active research effort.
What is the difference between DTM and DTZ?
DTM (distance to mate) is the number of moves to checkmate with perfect play. DTZ (distance to zeroing) is the number of moves until a capture or pawn move resets the 50-move counter. DTZ is what matters under real rules, because a win needing more than 50 captureless moves can be claimed as a draw.
Are tablebases free to use?
Yes: the Syzygy tablebases are open source, and Lichess hosts a free public tablebase API for positions with up to 7 pieces. This site uses it to verify every position and to show you the fastest win after a mistake; the opponent you play is an engine tuned to resist rather than resign.
What is a cursed win?
A position that is theoretically winning but requires more than 50 moves without a capture or pawn move. Under the 50-move rule the defender can claim a draw, so the 'win' evaporates in a real game.
Don't just read it, play it
Every position below is playable right now, free, no signup, against an opponent that never gives up and explains every mistake.
Practice all 19 queen vs rook positionsFollow the full curriculum (free)or sharpen these endings in rated drills