Content of hash entry in perft

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Posts: 13
Joined: Fri Mar 01, 2019 11:46 am
Full name: Marc-Philippe HUGET

Content of hash entry in perft

Post by mphuget » Fri May 24, 2019 8: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


Posts: 855
Joined: Sun May 23, 2010 11:32 am

Re: Content of hash entry in perft

Post by elcabesa » Fri May 24, 2019 10:14 pm

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

Post Reply