In chess, an endgame tablebase, or simply tablebase, is a computerised database containing precalculated evaluations of endgame positions. Tablebases are used by players and chess engines to analyze games and positions. Tablebases are typically exhaustive, covering every legal arrangement of a specific selection of pieces on the board, with both White and Black to move. For each position, the tablebase records the ultimate result of the game assuming perfect play from both sides (i.e. a win for White, a win for Black, or a draw), and the number of moves required to achieve that result. Because every move from a covered position results in another covered position, the tablebase acts as an oracle that always provides the optimal move. Tablebases are generated by retrograde analysis, working backwards from checkmated positions. By 2005, tablebases for all positions having up to six pieces, including the two kings, had been created. By August 2012, tablebases had solved chess for almost every position with up to seven pieces, with certain subclasses omitted due to their assumed triviality; the first complete seven-piece tablebase was released in August 2018. As of 2026, work is still underway to solve all eight-piece positions. Tablebases have profoundly advanced the chess community's understanding of endgame theory. Some positions previously believed to be drawn were proven to be winnable; in some cases, tablebase analysis found a mate in more than five hundred moves, far beyond the ability of humans, and beyond the capability of a computer during play. This caused the fifty-move rule to be called into question, since many positions were discovered that were winning for one side but drawn during play because of this rule. Initially, some exceptions to the fifty-move rule were introduced, but when more extreme cases were later discovered, these exceptions were removed. Tablebases also facilitate the composition of endgame studies. While endgame tablebases exist for other board games, such as checkers, nine men's morris, and some chess variants, the term endgame tablebase is usually assumed to refer to chess tablebases.
Background
Physical limitations of computer hardware aside, in principle it is possible to solve any game under the condition that the complete state is known and there is no random chance. Strong solutions, i.e. algorithms that can produce perfect play from any position, are known for some simple games such as Tic Tac Toe/Noughts and crosses (draw with perfect play) and Connect Four (first player wins). Weak solutions exist for somewhat more complex games, such as checkers (with perfect play on both sides the game is known to be a draw, but it is not known for every position created by less-than-perfect play what the perfect next move would be). Other games, such as chess and Go, have not been solved because their game complexity is far too vast for computers to evaluate all possible positions. To reduce the game complexity, researchers have modified these complex games by reducing the size of the board, or the number of pieces, or both. Computer chess is one of the oldest domains of artificial intelligence, having begun in the early 1930s. Claude Shannon proposed formal criteria for evaluating chess moves in 1949. In 1951, Alan Turing designed a primitive chess-playing program, which assigned values for material and mobility; the program "played" chess based on Turing's manual calculations. However, even as competent chess programs began to develop, they exhibited a glaring weakness in playing the endgame. Programmers added specific heuristics for the endgame – for example, the king should move to the center of the board. However, a more comprehensive solution was needed. In 1965, Richard Bellman proposed the creation of a database to solve chess and checkers endgames using retrograde analysis. Instead of analyzing forward from the position currently on the board, the database would analyze backward from positions where one player was checkmated or stalemated. Thus, a chess computer would no longer need to analyze endgame positions during the game because they would have been solved beforehand. It would no longer make mistakes because the tablebase always yielded the best possible move. In 1970, Thomas Ströhlein published a doctoral thesis with analysis of the following classes of endgame: KQK, KRK, KPK, KQKR, KRKB, and KRKN. In 1977, Ken Thompson's KQKR tablebase was used in a match against Grandmaster Walter Browne. Thompson and others helped extend tablebases to cover all four- and five-piece endgames, including KBBKN, KQPKQ, and KRPKR. Lewis Stiller published a thesis with research on some six-piece tablebase endgames in 1991. More recent contributors include:
… excerpt ends here. Continue reading the full article.

