X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=60667c8764e32a01f904477e66ad614b57b73b57;hp=8ef2513dd1a895c0fdda2ed28af7c5587f06de51;hb=8c10029df135f841126d17a65002e217c7ca1887;hpb=81e9cf043a7e8ac1aeb579e6ad17c695f7fb3d47 diff --git a/src/search.cpp b/src/search.cpp index 8ef2513d..60667c87 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -440,6 +440,7 @@ namespace { if ( depth >= 12 && !stop && PVSize == 1 + && bestValue > VALUE_MATED_IN_MAX_PLY && ( RootMoves.size() == 1 || Time::now() - SearchTime > (TimeMgr.available_time() * 20) / 100)) { @@ -745,7 +746,7 @@ namespace { && ttMove == MOVE_NONE && (PvNode || (!inCheck && ss->staticEval + Value(256) >= beta))) { - Depth d = (PvNode ? depth - 2 * ONE_PLY : depth - 4 * ONE_PLY); + Depth d = depth - 2 * ONE_PLY - (PvNode ? DEPTH_ZERO : depth / 4); ss->skipNullMove = true; search(pos, ss, alpha, beta, d); @@ -856,7 +857,8 @@ split_point_start: // At split points actual search starts from here && !captureOrPromotion && !inCheck && !dangerous - && move != ttMove) + && move != ttMove + && bestValue > VALUE_MATED_IN_MAX_PLY) { // Move count based pruning if ( depth < 16 * ONE_PLY @@ -878,9 +880,14 @@ split_point_start: // At split points actual search starts from here if (futilityValue < beta) { + bestValue = std::max(bestValue, futilityValue); + if (SpNode) + { splitPoint->mutex.lock(); - + if (bestValue > splitPoint->bestValue) + splitPoint->bestValue = bestValue; + } continue; }