You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Luca, thanks for your note, you're absolutely right, and in fact I have a C++ version which I'm not quite ready to publish yet, but which uses a scheme similar to what you suggest, with a 57 bit perfect hash (I believe 5 bits are enough to store the cards, assuming 30 permutations).
I think I was too influenced by chess engines when I originally wrote this that I didn't stop to think if it could be done in a better way :)
Thanks for sharing this interesting project with the community.
I just wonder why you opted for zobrist hashing. Isn't perfect hash achievable with an unsigned long?
In my mind something like the following could work:
This leads to a perfect hash using 58 bytes and avoids any related hash collision issue.
Of course I might be wrong and that's why I'm asking.
Regards
Luca
The text was updated successfully, but these errors were encountered: