Russell Sherwood Sunday, June 17, 2018
Tablebases are one of those facets of knowledge of (correspondence) chess that are taken as granted as being understood by all but are often not!
In simple terms what are they?
Wikipedia defines them as “An endgame tablebase is a computerized database that contains precalculated exhaustive analysis of chess endgame positions. It is typically used by a computer chess engine during play, or by a human or computer that is retrospectively analysing a game that has already been played.”
Clear now? Maybe not! Let’s start at the beginning. If we have two pieces, the only outcome of the position is a draw. Not a lot of help. If we have three pieces, it could be a draw or a Win/Loss – depending on the pieces and their positions. The Endgame tablebase has every possible combination and position on the board stored in its table(s). These are linked to together, so the table can provide a definitive answer to the theoretical outcome of the position.
Tablebase development has reached the point that 6 piece tablebases are widely available and 7 piece ones are available from limited sources. Limited 8 piece are in development but are not publicly available.
What is worth considering is that Tablebase development is a slow process – this is due to the staggering amount of computing power required to calculate them as the number of pieces increases, thus it is not expected to see rapid releases of larger tables on a rapid basis.
In addition to this, the storage requirements for Tablebases are significant. Currently, 7 piece tablebases are only available online and are not practical for the typical home user to install locally.
Why are Tablebases important to Chess Engines
Let us consider for a moment how an engine evaluates a position. Generally, most have very little specific, definitive knowledge but use a general approach which considers a number of factors – Material, Space, King Safety……to calculate a score for a specific position. The relative scores for possible choices are compared and the best line is built by following the “best” scores.
The problem with the approach for endgames is that the specifics of the position can have a massive influence on the correct move, which is general approach will not see. This is the reason why we see massive engine scores on drawn position or visa-versa.
With a tablebase this issue is avoided as the engine, knowing it has tablebases available, probes them when the analysis reaches that number of pieces on the board. It now has a definitive result – Win, Lose or Draw, which it can then use to “correct” its analysis of a position.
This means, in theory, at least that the engine is better able to navigate late middlegame and endgame positions.
For the CC player Tablebases should always be installed, where available as without them you will find promising looking positions turning to draws and draws turning to defeats!
So there are one set of definitive tablebases?
Er, no! There are a few different types available:
Thompson, Edwards, Nalimov, Scorpio, Gaviota, Lomonsov and Syzygy
The differences between these tend to cover the number of pieces available, Information provided and the size of the tables.
A good summary of this can be found at https://chessprogramming.wikispaces.com/Endgame+Tablebases#x7-man
In terms of information provided we have two main types:
Depth to Mate: This is, as you might guess, the number of moves from a position, with the best play by both sides, to mate.
Win, Draw, Loss: Here we have the simple outcome of a position.
For pure engine use, WDL is adequate as once the engine has a result it can modify its search accordingly, whereas DTM is of more interest to Human Analysts. Newer tables tend to come in the WDL format as it is much more compact, which is valuable as the number of pieces increases.
Which should I get?
For local set up its hard to get beyond Nalimov, Scorpio or Syzygy. In terms of functionality, most engines will directly link to Syzygy, whereas the other two tend to be linked via the GUI.
If we consider size Scorpio is the smallest, followed closely (in relative terms anyway) by Syzygy, with Nailimov being a distant third.
Probably the main factor is going to be your source – are you going to buy it on a Disk or Download it?
Taking these three factors into account the probable choice is 1) Syzygy 2) Scorpio 3) Nalimov. OF course, on top of this, the really serious player will probably obtain links to Lomonsov’s 7 Piece table as well!
What Else?
This is not quite the end of the story. It is possible to create Tablebases from a specific position. There are some older pieces of software such as FinalGen or Freezer which will calculate from a specific position. These are very slow and take up a lot of storage but may be of interest to some players.
Postscript
Should there be sufficient interest I will write a run through on how to set up TB on the major Engine/GUI platforms.