aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.de>2023-01-19 22:40:24 +0100
committertslil <tslil@posteo.de>2026-08-28 19:37:41 +0100
commitcb2b78ced27fc7996ed11c3450f69138d7d1b61f (patch)
tree8d8e00e9125a216184127ee56224e1b68660f791
parent0223a9bec5535fced1a7698b55fd42155d9b0446 (diff)
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).
-rw-r--r--include/negamax.c2
1 files changed, 1 insertions, 1 deletions
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) {