~tslil/ctak

f3b67ebd661e15eb716093333ac5689a5d170d23 — tslil clingman 8 months ago afd3d8e
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).
1 files changed, 1 insertions(+), 1 deletions(-)

M include/negamax.c
M include/negamax.c => include/negamax.c +1 -1
@@ 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) {