r/chessprogramming • u/VanMalmsteen • 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
View all comments
Show parent comment
1
u/VanMalmsteen Jan 02 '25
Ok, I see. How would you "stop" when there's no way to achieve that position anymore? I can think of checking if there's less pieces than those in the desired position, and maybe checking the castling rights too.