Page 1 of 1

Content of hash entry in perft

Posted: Fri May 24, 2019 10:50 pm
by mphuget
Hello everyone,

Playing in this moment with perft, I was wondering what could be the content of a hash entry. It seems obvious to have a Zobrist key to represent the position but what else? My feeling is a counter (number of moves) and the distance from this position to the depth we are looking for.

So, if during doing perft, we find the same position with the same distance, we directly use the number of moves recorded and cut the computation.

Does it mean it is better to do a breadth-first search to increase the chance to reuse the hash entries?

Thanks in advance for your help

mph

Re: Content of hash entry in perft

Posted: Sat May 25, 2019 12:14 am
by elcabesa
in my impleentation I store, key, depth of the subtree, nodes of the subtree