X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=ab34a8451cceda529f7996faf4df0500d6715f0c;hp=c0e355b7522b4044a7f4c5d1ab89620abdfd5ed5;hb=58452de86d120ca7894917c656ecbb56a6273f22;hpb=93c9f342ca4f2230021ddbca83a991ff90a6a246 diff --git a/src/search.cpp b/src/search.cpp index c0e355b7..ab34a845 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1143,7 +1143,7 @@ namespace { // Only move extension if ( moveCount == 1 && ext < OnePly - && depth >= 8 * OnePly + && depth >= 4 * OnePly && tte && (tte->type() & VALUE_TYPE_LOWER) && tte->move() != MOVE_NONE @@ -1152,9 +1152,9 @@ namespace { Value ttValue = value_from_tt(tte->value(), ply); if (abs(ttValue) < VALUE_KNOWN_WIN) { - Value excValue = search(pos, ss, ttValue - OnlyMoveMargin, depth / 2, ply, false, threadID, tte->move()); + Value excValue = search(pos, ss, ttValue - OnlyMoveMargin, Max(Min(depth / 2, depth - 4 * OnePly), OnePly), ply, false, threadID, tte->move()); if (excValue < ttValue - OnlyMoveMargin) - ext = OnePly; + ext = (depth >= 8 * OnePly)? OnePly : ext + OnePly / 2; } } @@ -1446,7 +1446,7 @@ namespace { if ( forbiddenMove == MOVE_NONE && moveCount == 1 && ext < OnePly - && depth >= 8 * OnePly + && depth >= 4 * OnePly && tte && (tte->type() & VALUE_TYPE_LOWER) && tte->move() != MOVE_NONE @@ -1455,9 +1455,9 @@ namespace { Value ttValue = value_from_tt(tte->value(), ply); if (abs(ttValue) < VALUE_KNOWN_WIN) { - Value excValue = search(pos, ss, ttValue - OnlyMoveMargin, depth / 2, ply, false, threadID, tte->move()); + Value excValue = search(pos, ss, ttValue - OnlyMoveMargin, Max(Min(depth / 2, depth - 4 * OnePly), OnePly), ply, false, threadID, tte->move()); if (excValue < ttValue - OnlyMoveMargin) - ext = OnePly; + ext = (depth >= 8 * OnePly)? OnePly : ext + OnePly / 2; } }