Archived

This topic is now archived and is closed to further replies.

Sigloxx

Nalimov Tablebases format

Recommended Posts

Sigloxx    122
I have searched google a lot for some website that would explain exactly how the data is stored in nalimov chess endgame tabebases (compressed or not), but couldn''t find any.. I am interested in it for two reasons : being able to make a chess program that uses them, of course, but also mainly, as a chess studies composer, I would love to be able to create some specific tablebases for some given positions in order to tell fritz or some other strong program the result of a given position. I don''t know if the way nalimov tables are stored and checked by the program allows this for just a specific position, not making a whole table for a given material, though? Maybe it would be easier to stock this information in the format used for fritz opening books? (wich I don''t know as well..). Thanks in advance for all infos you can give me .

Share this post


Link to post
Share on other sites
Sigloxx    122
RPGeezus, I noticed you had been searching for the same thing as me. Did you find any infos? And what are these "chessy postcript" files you mentionned as a possiblity to go through? I guess I will end up having to download a non compacted nalimov file and try to figure out by myself how it''s stocked...

David Antonini

Share this post


Link to post
Share on other sites
Russell    118
Endgame tablebases are rather complicated to create and use in practice (well, let''s just say that they are complicated to create efficiently without wasting dozens or hundreds of gigabytes on your hard disk, if you have dozens or hundreds free in the first place). The main problem with creating them is that they require a huge amount of storage space. The 3, 4, and 5-piece endings combined take up 7GB after using numerous "tricks" to reduce the size greatly, and then also after compression. They are working on creating the 6-piece endings now, and it is estimated that they will require over 1.2TB (1200 GB) of space when finished.

So to attempt to reduce the size of the files they use various tricks as I mentioned. They take advantage of the fact that one board position can represent other board positions when you rotate the board and mirror the board horizontally and veritcally. They also try to eliminate illegal positions, and take advantage of other things like this. Then after they have the uncompressed file created, they split them up into 8KB blocks and compress each block, then concatenate each block and store it in a file.

As for the file format, it''s probably not something you could reverse engineer. The file is nothing but mate values. For instance, if you see a byte with the value of 5, that means "mate in 5" (of course that is very simplified, and it is much more complicated in reality). They use the board position to create an index into the file (much like looking up a value in one gigantic array), and then get that byte''s value, and that value means something (win in X number of moves, or something like that). How you get an index for a particular position is rather complicated also. With all of the tricks the use to reduce the size of the files, it gets very confusing very quickly.

There aren''t really any "Nalimov Tablebase Format for Dummies" websites out there, but there are a few good starting points.

A good introduction webpage: http://www.aarontay.per.sg/Winboard/egtb.html

Some more technical postscript files:
Space-efficient indexing of chess endgame tables
Endgame databases and efficient index schemes

The source code for Eugene Nalimov''s endgame tablebase generator used to be publicly available at ftp.cis.uab.edu/pub/hyatt/TB, but it''s not there anymore. You could try emailing Robert Hyatt (hyatt@cis.uab.edu, author of Crafty) or Eugene Nalimov (eugenen@microsoft.com)himself and see if they can send it to you if you are interested.

You also might ask any questions you have at the Computer Chess Club. Eugene Nalimov, among many others who know much more about this than I, post there.

Share this post


Link to post
Share on other sites
RPGeezus    216
Sigloxx:

There is a reason I never found a simple example of using the tablebases. They are in fact quite complex. Implementing support for them is not trivial. As my Chess program was just ''for fun'' I decided not to put in the effort and moved on to other things.

Good luck though,
Will

Share this post


Link to post
Share on other sites