by Steve Lopez

One of the ways you can make Hiarcs7.32 even stronger than its usual toughness is by the use of tablebases. These are endgame databases in which every possible position for a selected group of pieces is stored for access by the program. Because the positions are all linked to each other in a logical framework, Hiarcs can play that specific endgame perfectly.

A partial set of tablebases is included with the program in a folder called /TBs. When you install Hiarcs, the installation program takes note of your CD drive's letter designation and sets Hiarcs up to automatically use these tablebases right off the CD, as long as the CD is in the drive. The tablebases are not automatically copied to your hard drive and you do not need to copy them to your hard drive yourself (unless you want to use them as part of a more complete set that you can download or generate -- we'll cover this later in this article).

When you start or load the Hiarcs7.32 engine, you'll see a box appear which reads Initializing tablebases. This means that the Hiarcs7.32 engine is preparing to use the tablebases should the need arise during normal play. Once one of the "known" endgames (that is, an endgame for which a tablebase file exists on the CD) appears in a normal game, Hiarcs will automatically switch to the proper tablebase file and use it.

It's as simple as that -- no fuss, no muss. However, there are a few slightly more involved things that you can do with tablebases. One of these involves an engine called Tablebase 1.0. This engine is included for analysis of endgame studies. You can use it within the Hiarcs7.32 user interface or any of the other 32-bit playing program interfaces (Fritz5.32/Junior5/Nimzo99), as well as within ChessBase 7. To use the tablebases to analyze an endgame position that you set up yourself or one from the games database, you should use the Tablebase 1.0 engine rather than the Hiarcs7.32 engine.

It's pretty easy to use this engine. First, make any presently active chess engines inactive by moving them over to the "inactive" box. Then load the Tablebase 1.0 engine. Don't worry about hash table size -- this isn't critical when using Tablebase 1.0 (it's not searching, evaluating, and storing positions like the other engines do). You'll see the familiar Initializing tablebases message appear on the screen. Once you have the engine loaded, click OK. Then go to the Board button and click "Setup pos." to set up an endgame position on the board.

Let's try this with a fairly simple endgame. Place a White King on g1, White pawns on e2 and f2, a Black King on c8, and a Black pawn on d7. Make it White's turn to move. Click OK to go back to the main screen. Now hit [ALT-F2] to start the Tablebase 1.0 engine. After a second or two, you'll see some moves appear in the analysis window. What you have is a list of every legal move, along with the Informant symbol for the game's result (assuming perfect play for both sides) as well as the number of moves it will take to reach the result. In the example we're using, we see that White wins with all but two of the legal moves. The best move (that is, the one that leads to the fastest win) is Kg2, which will result in mate in 20 moves.

This is all pretty simple stuff. All you need to know to use the tablebases supplied with the program is that the Hiarcs7.32 engine will automatically access them during play, while the Tablebase 1.0 engine is used for analysis on positions you set up yourself.

However, the documentation mentions something about generating tablebases. What's this all about?

You get a lot of tablebase files with Hiarcs7.32 (over 370 megabytes' worth -- which is why they're not installed to the hard drive when you install the program). Even though this is a substantial number of tablebase files, it's still not the complete set of all possible tablebases.

A warning: you can download or generate all the possible tabelbase files, but this will take a huge amount of hard drive space. In their compressed form (which Hiarcs7.32 can utilize), a complete set of tablebases will require about 8 gigabytes of space on a hard drive. In uncompressed form, this number leaps to over 20 gigabytes. I strongly suspect that the vast majority of Hiarcs7.32 users won't be interested in generating any additional tablebases. However, for the truly hardcore among us, a program is included with Hiarcs7.32 that will allow you to generate the tablebases that aren't included on the CD.

The first step in expanding your tablebase collection is to create a new folder on your hard drive in which you'll store the tablebases. It doesn't matter where you store them. I suggest that you create a folder simply called Tablebases. Next, copy all of the files from the TBs folder on the Hiarcs7.32 CD to the new folder you've just created.

The next step is to edit the chssbase.ini file on your hard drive so that the program will "know" where the tablebases are located. This is very easy to do. Just double-click on the "My Computer" icon on your Windows desktop. Then, in the window that appears, double-click on the icon for your hard drive. You'll see a new window listing your folders. Double-click on the Windows folder and scroll down until you see an icon for the file chssbase.ini and then double-click on it. The program Notepad will open and show you the contents of this file. You can edit the file using Notepad just like you'd edit a textfile in any word processor. In the section under [Tablebase], you'll see a line that reads Path=, followed by the DOS path to the TBs folder on your CD. Change this path so that it's the path to the new folder you've created on your hard drive (using the example above, and assuming that your hard drive is the C: drive, the new path would read C:\Tablebases). Don't forget to click "Save" in the File menu in Notepad to save the change you just made. Then exit Notepad and close all of the windows you opened using "My Computer".

Now you're ready to start generating tablebases. Another warning: even if your computer is the envy of the civilized world (over 500 Mb RAM, Pentium III processor), some of the tablebases will take literally days to generate -- for each tablebase.

If you haven't yet run screaming from the room, you're ready to proceed. If you've copied the entire tablebase folder from your CD to your hard drive, you'll notice a program called tbgen.exe in your new tablebase folder. Go ahead and start this program and you'll see a window that looks like this:

This window allows you to select the parameters for generating tablebases. The Help file will give you plenty of information on how to use these settings. However, here are a few tips. First, select the pieces for the tablebase you want to build. For example, let's look at KQQPK -- which is a White King, two Queens, and a pawn against a lone King. Then select the folder the tablebase will be stored in by clicking the Directory button. You'll see some values appear in the boxes. "Available space" tells you how much space is available on your hard drive for storage of the tablebase. "Needed space" tells you how much hard drive space will be required to store the completed tablebase in uncompressed form. If you put a check in the "Compress" box, the value shown will be how large the tablebase file will be in compressed format (it's highly recommended to store them in compressed form). Be aware that you can't build a tablebase if the required space is larger than your available space.

Clicking the "Subendgames" button will allow the generator to create any additional tablebases that might arise from the tablebase you've selected. In our example, we selected KQQPK. Since there's a pawn on the board which may promote, there can be other endgames that arise from the one we selected. If we click "Subendgames", we'll see the program automatically highlight the additional endgames of KQQNK, KQQBK, KQQRK, and KQQQK.

If you're unsure of which endgames you should generate (due to system constraints) the generator program can advise you on which ones you should create; all you have to do is click on the "Suggestion" button. The program will always suggest the smallest tablebase(s) you don't already have on your hard drive.

Set "Cache size" to a fairly high value. This will vary from computer to computer, but the value given in "Main memory" will give you a guideline.

Once you've set the parameters, click the Build button and let it rip. That's all there is to it.

Please remember (and I can't stress this enough) that generating the largest tablebases can literally take days for each tablebase. There is, however, a somewhat quicker way to get them: you can download them from the Internet. Dr. Robert Hyatt's ftp site for his excellent Crafty chess program contains pre-generated tablebase files ready for downloading. These are in the compressed tablebase format and are ready for use in Hiarcs7.32. Just click on the link I've provided and it will take you right to the list of tablebases available. Note that the tablebase filenames contain an extra "." which will be read by most Windows OS' as a "_". You'll probably need to delete this character; the easiest way to do this is to delete it at the time you download the file. Internet Explorer and most other browsers will allow you to do this.

Another often-asked question is whether Fritz/Junior/Nimzo et al. can utilize the tablebases. Hiarcs7.32 and Crafty 16.6 are the only programs that will automatically use the tablebases during play, but you can use the Tablebase 1.0 engine within the other playing program interfaces for analysis of endgame positions that you set up yourself (as described earlier in this article).

If you feel the need for further documentation on tablebases, check the file readme.txt in the root directory of the Hiarcs7.32 CD, as well as the file \Manuals\English\Tbgene.doc and the Help file within the tablebase generator (tbgene.exe).

Tablebases really aren't as mysterious as some folks have been led to believe. For most of us, the tablebases on the CD are sufficient for our needs. For more advanced users, it takes a small bit of tweaking to get them set up properly but is really not very difficult. It's my hope that this article will get you where you want to be so that you make use of this excellent feature in Hiarcs7.32.

Until next week, have fun!

You can e-mail me with your comments, suggestions, and analysis for Electronic T-Notes. If you love gambits, stop by the Chess Kamikaze Home Page and the Yahoo Chess Kamikazes Club.