Page 1 of 1

Endgame book

PostPosted: 01 Nov 2011, 12:23
by geko
I would like to create a mine endgame book from nalimov tablebase file.
How can i convert .tbs files to txt file with this format? : FEN | move1, move2, .. ,moven
example:
1) 1k6/3K1p2/8/8/8/8/P5P1/8 w - - | g2g4, a2a4, g2g3...
2) 8/2p5/8/1k1K4/8/2P5/5P2/8 w - -| f2f4, kd5e6, c3c4...

This site allows online but only on line
http://www.lokasoft.nl/tbweb.aspx

thank you
Giuseppe

Re: Endgame book

PostPosted: 07 Feb 2012, 01:40
by Nguyen Pham
Nalimov tables have not moves, only numbers (distances) of moves to win / draw / lose. Thus you may extract something likes:
Fen1 | 15 // mate in 15 plies
Fen2 | -8 // side to move is losing in 8 plies
Fen3 | 0 // draw position

To have a list of moves to win you have to do a simple search yourself from above information.

To create the list of positions as above, there are two ways:
- hack to nalimov tables. You need to understand data structures, compress algorithms. It's so complicated so I do not recommend
- just use those tables as a chess engine. Create all positions, say all 3 pieces, then call provided functions of nalimov code to extract distance numbers. This is not too hard to do if you know how to use those tables with your chess. However, you may face a small problem of your very large data files

Good luck and have fun