From cb2b78ced27fc7996ed11c3450f69138d7d1b61f Mon Sep 17 00:00:00 2001 From: tslil clingman Date: Thu, 19 Jan 2023 22:40:24 +0100 Subject: Change transposition table lookup policy Given the approximate nature of the evaluations and truncated tree searches, the result of negamax will always be sensitive to the particulars of the depth bounding and the conditions for referring to precomputed values. The tradeoff here is a slight performance penalty (~200ms at depth 6 on my old Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz), but a greatly increased opponent strength as compared to `>=`, and the old convolutional network (flawed as the implementation was). --- include/negamax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/negamax.c b/include/negamax.c index 0f2c450..0ec40e5 100644 --- a/include/negamax.c +++ b/include/negamax.c @@ -83,7 +83,7 @@ static float negamax(tak_state_p state, const uint8_t cur_depth, tt_entry_t *entry = tt_seek(hash); // CAUTION: ≥ breaks search stability (vs =) on shallow depths - if (entry != NULL && entry->depth >= cur_depth) { + if (entry != NULL && entry->depth == cur_depth) { if (entry->flag == TT_EXACT) { return entry->value; } else if (entry->flag == TT_LOWERBOUND && entry->value > alpha) { -- cgit v1.2.3