ArticleslgStudy

computer science

Endgame tablebase

Endgame tablebase is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Endgame tablebase rather than just read about it. In short: 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.

Endgame tablebase — main illustration
Endgame tablebase — illustration

Key takeaways

  • Endgame tablebase belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Endgame tablebase to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Endgame tablebase from memory before moving on to harder problems.

Reference excerpt

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.

Illustrations

Endgame tablebase: A typical interface for querying a tablebase.
A typical interface for querying a tablebase.

Worked examples

Example 1 — a first encounter with Endgame tablebase

Start with the simplest possible case. Write down what Endgame tablebase claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Endgame tablebase before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Endgame tablebase ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Endgame tablebase

In research
Endgame tablebase appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Endgame tablebase in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Endgame tablebase is common in secondary-school and first-year university syllabi. It links to neighbouring topics Chess endgames, Chess terminology, Computer chess, so understanding it makes those chapters shorter.
In everyday life
Look for Endgame tablebase outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Endgame tablebase” →

How to study Endgame tablebase in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Endgame tablebase means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Endgame tablebase out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Endgame tablebase in simple terms?

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.

Why does Endgame tablebase matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Endgame tablebase?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Endgame tablebase.

Tags

  • Chess endgames
  • Chess terminology
  • Computer chess
  • Types of databases

Keep exploring