Content of hash entry in perft
Posted: Fri May 24, 2019 10:50 pm
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
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