Skip to content

Commit

Permalink
tt: Change tt condition
Browse files Browse the repository at this point in the history
  • Loading branch information
calcitem committed May 7, 2024
1 parent d53c654 commit c4fa810
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,11 @@ Value qsearch(Position *pos, Sanmill::Stack<Position> &ss, Depth depth,
#ifdef TRANSPOSITION_TABLE_DEBUG
Threads.main()->ttHitCount++;
#endif

bestValue = probeVal;

return bestValue;
if (type == BOUND_EXACT || (type == BOUND_LOWER && probeVal >= beta) ||
(type == BOUND_UPPER && probeVal <= alpha)) {
bestValue = probeVal;
return bestValue;
}
}
#ifdef TRANSPOSITION_TABLE_DEBUG
if (probeVal == VALUE_UNKNOWN) {
Expand Down

0 comments on commit c4fa810

Please sign in to comment.