I'm currently using transposition tables for move ordering. Using iterative deepening search, I store the minimax value of the previous iteration to order moves for the next iteration. That's all fine and good.
Here's my confusion:
If I find a certain position in my transposition table, then I use the previously calculated score for move ordering (from the previous iteration of iterative deepening). However, if this position's score is updated (after minimax is returned), and the position is found AGAIN in another subtree (the same iteration of iterative deepening) - I don't want to just use it for move ordering... I should be able to return the value, because the value has now been calculated for this iteration and is absolute.
Here's my question: Is it standard to have two transposition tables? One for the previous iteration, and one for the current iteration of iterative deepening. So I would first check the table for the current iteration, to see if the minimax value was calculated already, and simply return this value. If it's not in this table, I would use the table for the previous iteration, for move ordering. If it's in neither, then it's a new position I haven't seen before in this search.
Is this line of thinking correct, or is there a more efficient method?
Typically you'd want to not only store the last found minimax value of a state in your table, but also the depth limit you used in the iteration when you stored the state in the table. That way, when you look it up in the table later, you can tell whether it was last updated in a previous iteration or in the current iteration by comparing the depth limit stored in the table entry to your current depth limit. If those are equal, you know the table entry was last updated in the current iteration, and you can directly use the value stored in the table without any extra search
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With