Thursday, November 12, 2015

Syzygy tablebases: maximizing performance

Syzygy tablebases: maximizing performance

by Albert Silver
2/10/2015 – Tablebases are wondrous tools to help analyze the endgame, and improve engine evaluation, but they do come at a cost. While the five-piece set will easily fit into almost any computer's memory without accessing the hard disk, the much larger files for six pieces can cause significant slow downs on some machines. Here are some tips to maximize performance.

The benefit of using the tablebases should be obvious to any. Even though computer chess experts argue that the precision of the knowledge is almost exactly offset by the fractional loss in speed when it analyzes endgames, anyone who has seen the engine produce wildly optimistic evaluations due to a misunderstanding of rook endgame realities, or material imbalance that has no hope of winning, will appreciate being able to trust the evaluation and not ask themselves whether this position is one of those exceptions.
Six piece positions can be even harder, such as rook versus bishop and two pawns, queen versus rook and two pawns (think of the numerous fortress situations), and the list goes on. The problem is that some of the files of the more difficult positions can take up one or even two gigabytes a piece. If the engine is accessing more than one due to the various situations it is considering, it can cause the computer to start reading the hard disk non-stop, which in turn can result in significant slowdowns. This is not related to ChessBase's DVD set, or any of the ChessBase programs, it is simply the nature of 20GB or more of files constantly being consulted to read the results as the engine looks something up.
Even the best hard drives, such as this Black Edition of Western Digital, may have
issues accessing all the information needed at the speeds the engine requests.
Not all computers will have any issues, so if you do not, then do not concern yourself any further. If you do, however, there are a variety of ways to resolve this issue, so that you need not forego on this great tool.

Use an SSD

The easiest solution is to install the files on an SSD. These are digital storage devices, much like a pendrive, that can be used like a hard disk, but are many many times faster. They have many benefits that exceed tablebases of course. Booting up a computer in which the operating system was installed will take a fraction of the time it would on a normal hard disk. If you have ever found yourself tired of waiting for a program to open or close, SSDs will more or less end that issue.
SSDs are incredibly fast, and can greatly improve your overall computer performance, not just
for tablebases as being suggested here
Finally, for the purposes of this article: installing the tablebases on the SSD will unquestionably solve any performance issues, if you had any.
There are two caveats that need to be mentioned: if you are running the engine on a laptop that doesn't already have an SSD, this solution may not be feasible, and the second is the cost. Although prices have plummeted since they first came out, a 256GB SSD can cost upwards of $100 in the US, which may not be acceptable to everyone.

Use a Pendrive

In many ways, this is the Goldilocks solution, providing enormous performance improvements, without the SSD's cost, and completely workable on a laptop as well. It also means you can use the tablebases on a laptop even if you do not have a DVD drive to install them from.  
For this solution, all you need is a pendrive that is big enough to fit them, which for the ChessBase
set means about 20GB of files, so a 32GB pendrive. It is also recommended that you use a USB 3.0
pendrive, as it will be considerably faster. Nowadays that will cost under $15.

Installing on a pendrive

There is nothing to it. Just find the Tablebases directory where you installed the files, in my case
my second hard disk (D:), and then copy them to your pendrive.

Configuring ChessBase to use a pendrive

Even if you were able to install the DVDs directly to a pendrive (I have not tested this, but imagine it is possible), if you take the pendrive to another computer, that copy of ChessBase or Fritz will still need to be configured. Thankfully, though there are a few steps to follow, it is not hard.
In ChessBase or Fritz click on File at the top left, and then Options
In the pane, click on the Tablebases tab at the top, and then the More... button
A new pane will open, specifically for configuring various tablebases. Choose Syzygy (Engine)
and then click on the [...] next to the three paths. Here you will need to show it where to find
the tablebases.
For each path, configure one of the three directories as above. Once done, click on Ok, and then Apply.
Now, whenever you turn on Komodo 8, or any other engine that supports the Syzygy tablebases such as Houdini 4 or Stockfish, it will use the Syzygy bases installed on the pendrive.

Using only five-pieces

Why would you want to do this? If you do not have an SSD or a pendrive, want the tablebases, but are suffering from slowdowns, you can use the following compromise: use only the five-piece set. Since they are under 1 GB, and can easily fit in the computer's RAM.
In the same configuration screen as above, click on Clear, and then set only the path for the
five-piece set. The directory is Syzygy345. Leave the others blank.
If you find yourself having to use this last scenario as a solution, I strongly suggest you get a pendrive for the six-piece set. The cost is small, but the information those six-piece tablebases add is truly not to be underestimated. It means that everytime its search leads to one of those situations with six pieces, it can stop searching as it knows exactly the result and evaluation. 

No comments:

Post a Comment