diff options
Diffstat (limited to 'include/negamax.c')
| -rw-r--r-- | include/negamax.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/negamax.c b/include/negamax.c index 6c29481..c86eeab 100644 --- a/include/negamax.c +++ b/include/negamax.c @@ -100,6 +100,7 @@ float negamax_generate(tak_state_p state) { // this is constant across iterative deepening const uint64_t root_hash = zobrist_compute(state); + state->hash = root_hash; // anchor the incremental hash at the root #ifdef RECORD_PV pv_leaf_t iteration_leaf; #endif @@ -197,7 +198,7 @@ static float negamax(tak_state_p state, const uint8_t cur_depth, action_take(state, actions[idx]); - const uint64_t child_hash = zobrist_compute(state); + const uint64_t child_hash = state->hash; // Compute the value of the node and retain the leaf that produced it. float node_value; |
