Sunday, May 22, 2016

Endgame Tablebases...Do You REALLY Need Them?

     I was recently asked about the value of using endgame tablebases with analysis engines. The truth is, my knowledge of TBs is pretty slim...I knew there are several different ones, but beyond that, not much. My thought was that they are not necessary because most engines are pretty good at endings these days, so TBs will not help that much. Now, I am not so sure. One thing I learned was that you have to use the right endgame tablebase with whatever engine you are using. 
     I set up a B+N (regarded as the most difficult of the elementary mates) and a 2B ending and Stockfish 7 and Komodo 8 both found the mates almost immediately.  Even the old Fritz 5.2 found the wins almost at once. But, in the 2B ending Arasan 19.0.1 showed a winning advantage (10.00 evaluation) after three minutes, but did not show a mate. The B+N ending was harder for it; after three minutes, it showed an advantage of only 1.25 of a P. 
     Tablebases are databases that provide perfect ending solutions for a set number of pieces. That is, a five-piece tablebase is able to instantly tell you the best play for any position with two Kings plus any three pieces. Engines refer to TBs in their analysis and this makes them play better in endgames. Another advantage is that tablebases can help an engine decide whether to exchange down to an endgame covered by the tablebase. On the downside they can take up a lot of space, but with today's computers that should not be much of a problem.

The big three are: 
Nalimov tablebases – these are available by ChessBase on DVD, and take up as many as nine DVDs. These include the full five-piece sets as well as a few six-piece sets. Although they are the oldest and take up the most space, they are also the most widely supported. The five-piece set takes up a little over 7GB.
Gaviota tablebases – These are newer than Nalimov and take up slightly less space. Even though they are free, downloading them is a pain.  The full five-piece set takes up just over 6.5 GB.  
Syzygy tablebases - They are the newest and require the least amount of space (less than 1 GB for five-piece set) and is especially recommended for Houdini 4 because it was designed to make the most of them. 

     Graham Banks is a New Zealand computer chess aficionado. As a tester of chess programs, he is co-founder and member of the CCRL group. According to Banks, if tablebase support is built-in to the engine it could add a 5-10 Elo improvement. Others have estimated that most engines gain at most 25 Elo from using them and others have found no significant difference in playing strength. So, it seems that using 3-4-5 piece tablebases will only give a minimal Elo increase, if any at all. Or does it? See the position below. 
     I don't have TBs installed and if I ever have any question about a particular ending with six pieces or less I do it the hard way and consult the online Shredder endgame database. Another reason I have not installed them is because it seems like a lot of work and to be honest, I think I lack the technical know-how.
     For further reading visit A Guide To Endgame Tablebases at Horizon Chess. Stack Overflow also has a good article that explains the use of tablebases HERE.

White to move
    Above is a position where TBs would definitely be a help. Black wins in 40 moves according to the online tablebase. After 3 minutes Stockfish showed an evaluation of about 3.50 in black's favor. In a Shootout consisting of five games (17-25 plies), the results were rather surprising. Black won three games, but two were drawn. Of course in the Shootout the specified plies were reached in seconds which means that this method is not an absolutely reliable indicator of the correct result. What is indicated though is that the addition of the 3-4-5 piece tablebases could, in some positions, be a real help.

No comments:

Post a Comment