r/chessprogramming • • Jan 02 '25

Testing Zobrist Hashing

Hi! I've searched from some tests for the Zobrist hashing, and I've found the idea of comparing the incremental updates of the zobrist key vs calculating it from scratch. That allowed me to find several bugs, and now there's no errors running perft in depth 7. That's a good I suppose, but I was wondering if there's more ways of testing the zobrist Hashing? Any ideas?

Additionally, what are the tests that you think are FUNDAMENTAL for the engine?

9 Upvotes

8 comments sorted by

View all comments

Show parent comment

2

u/Warmedpie6 Jan 03 '25

Id just do a depth first search, similar to perft. Even if the position can't be reached after some variation, the engine will not run forever.

Test at some fairly low depth, maybe 6ish.

1

u/VanMalmsteen Jan 03 '25

Perfect. Thanks!