JP wrote:The generation itself is a minor issue but how to compress them intelligently is the challenge. The Nalimov EGTB can be used only to a certain depth in order to not kill the performance of the program. With bitbases held in RAM the engine can go deeper and detect the win/draw earlier. The cost is of cource lack of information about the shortest line and therefore risking to miss how to avoid or utlilise the 50-move rule.
Compression and fast access is the main questions for bitbases IMHO.
/Peter
A nice approach, that I think is used by KnightDreamer, would be to use an (ID-3 generated) binary decision tree . This decision tree would be built of boolean expressions such as "king is check", "king in pawn sq" etc.
Simple bitbases would compress to a few bytes. For example, KQK would only need the ID3 tree with a few nodes to answer, e.g.
Code: Select all
"white to move?"
true : WIN
false: "black k attacks Q?"
true :"white K defends Q?"
true : WIN
false: DRAW
false: WIN
The good thing is that you would not have to worry about how to combine the boolean expressions with if/and/or, the id3 algorithm takes care of that.
Once the binary decision tree gets too large/deep, you could compress the remaining subtree with zlib/7zip or perhaps you could use OBDD's.
You may want to take a look at this link:
http://www.daimi.au.dk/~doktoren/master_thesis
It explains how to compress endgame databases using binary decision diagrams. The advantage is that de obdd's can be probed without decompressing them first.
I am not sure how well this compression would work for 5 or or more men endgame bitbases though.