X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=5d803949112423dfe4b3ebe1570437d945b6b1c2;hp=0d5362e7fcbde939760f55dd856c2a8ab913e165;hb=5ea816792175ec53523035673dad703e7be1f662;hpb=55b5b03273e9740b63663ee84a17788c5424eec3 diff --git a/src/search.cpp b/src/search.cpp index 0d5362e7..5d803949 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1158,7 +1158,7 @@ namespace { // To verify this we do a reduced search on all the other moves but the ttMove, // if result is lower then TT value minus a margin then we assume ttMove is the // only one playable. It is a kind of relaxed single reply extension. - if ( depth >= 4 * OnePly + if ( depth >= 8 * OnePly && move == ttMove && ext < OnePly && is_lower_bound(tte->type()) @@ -1168,8 +1168,7 @@ namespace { if (abs(ttValue) < VALUE_KNOWN_WIN) { - Depth d = Max(Min(depth / 2, depth - 4 * OnePly), OnePly); - Value excValue = search(pos, ss, ttValue - SingleReplyMargin, d, ply, false, threadID, ttMove); + Value excValue = search(pos, ss, ttValue - SingleReplyMargin, depth / 2, ply, false, threadID, ttMove); // If search result is well below the foreseen score of the ttMove then we // assume ttMove is the only one realistically playable and we extend it. @@ -1461,7 +1460,7 @@ namespace { // To verify this we do a reduced search on all the other moves but the ttMove, // if result is lower then TT value minus a margin then we assume ttMove is the // only one playable. It is a kind of relaxed single reply extension. - if ( depth >= 4 * OnePly + if ( depth >= 8 * OnePly && !excludedMove // do not allow recursive single-reply search && move == ttMove && ext < OnePly @@ -1472,13 +1471,12 @@ namespace { if (abs(ttValue) < VALUE_KNOWN_WIN) { - Depth d = Max(Min(depth / 2, depth - 4 * OnePly), OnePly); - Value excValue = search(pos, ss, ttValue - SingleReplyMargin, d, ply, false, threadID, ttMove); + Value excValue = search(pos, ss, ttValue - SingleReplyMargin, depth / 2, ply, false, threadID, ttMove); // If search result is well below the foreseen score of the ttMove then we // assume ttMove is the only one realistically playable and we extend it. if (excValue < ttValue - SingleReplyMargin) - ext = (depth >= 8 * OnePly) ? OnePly : ext + OnePly / 2; + ext = OnePly; } }