I wanted to eliminate the risk of a hash collision. So if there is a bug or a bad move being played I can be sure it's not because of that. May be 8 x 64 bits is a bit too expensive.
For this I add the FEN string to the TT entries when I want to test for collisions; that make easier to debug (it slows down the program more than your solution, of course).
Another way could be to just add an extra hash value of the whole 8x64 bits, maybe with sum/rotations, so to have a single extra 64 bit key.
Henk wrote:I also did not like the code I created for Zobrist key. With bit boards key you don't have to update the key for that has already been done.
Don't know what is the minimal size for a complete key. Probably about 4 x 64 bits I guess.
4 x 64 bits is 256 bits. John Tromp has a proof that the number of chess diagrams is at most 2^155. So you can do better than 256 bits, even after you take castling rights and en-passant state into account.