Closed kesslwovv closed 11 months ago
You need to track the depth yourself in your own transposition table implementation. Zobrist key cannot contain anything except Zobrist hash or else it will not be a Zobrist key anymore.
Maybe create a hash struct with the evaluation and the depth that the move was searched to. Then you could make educated decisions in your search function, wether to use a hash or not.
thanks
As far as i can tell, the Ply (move count) is not encorporated into the Zobrist Key.
This is not crucial but it is annoying, because it can change evaluation when using a hash map.
Here is how I encountered this issue:
When I started implementing Alpha-Beta pruning, I kept the non-pruning version (with hashmap optimisation) to compare the evaluations and ensure that the new behaviour was correct. however in rare cases this hashmap optimisation changed the result, which was because later states, that could also be reached through a shorter move sequence, were evaluated at a shallower depth but still generated the same key.