I have recently tried to implement a TT into my engine, which seems super easy in theory. Then I saw really strange behaviors when using it, first of all the node count and time it took to a certain depth went up.
Then I tried a simple approach for move generation:
Code: Select all
if key in self.tt_move:
children = self.tt_move[key]
else:
children = self.gamestate.get_valid_moves()
self.tt_move[key] = childrenBut when testing I found that while this simple "TT" reduced my overall time to a depth slightly, it also reduced the number of moves searched. Since this is just a matter of getting the legal moves in a position this seems very strange, and I suspect there is a bug somewhere.
So to the main question:Is there a testing framework to test if I incrementally update my Zobrist key correct? I have made some simple manual tests which seems to be fine, but is there more of a batch approach similar to perft? Or how do you guys handle this?
