X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=ed029b4c4a08e6d15b3ef28f2b4b246b04ad74d9;hp=7a06dad93f94035b046c9384938ce6d8d0b983b1;hb=7d42d02ec77a03c4c1e1b399df30ef8b363c1237;hpb=0586b51f9c398008f264d78a2888c0d68d9561cb diff --git a/src/search.cpp b/src/search.cpp index 7a06dad9..ed029b4c 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -745,7 +745,7 @@ namespace { && ttMove == MOVE_NONE && (PvNode || (!inCheck && ss->staticEval + Value(256) >= beta))) { - Depth d = (PvNode ? depth - 2 * ONE_PLY : depth / 2); + Depth d = depth - 2 * ONE_PLY - (PvNode ? DEPTH_ZERO : depth / 4); ss->skipNullMove = true; search(pos, ss, alpha, beta, d); @@ -856,7 +856,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 +879,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; }