Content of hash entry in perft

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

mphuget
Posts: 13
Joined: Fri Mar 01, 2019 12:46 pm
Full name: Marc-Philippe HUGET

Content of hash entry in perft

Post 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
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: Content of hash entry in perft

Post by elcabesa »

in my impleentation I store, key, depth of the subtree, nodes of the subtree