X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=727990dc9d354b753004ae37b61afd7f2c1d28ad;hp=814a96d98cb66abed49d617566001b350d349798;hb=7e9f776fcafe0121c7449f4339b26d77c14adf50;hpb=e14046517ed0a690c0969b3ca8d1b0e25ac9fb9e diff --git a/src/search.cpp b/src/search.cpp index 814a96d9..727990dc 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -902,7 +902,7 @@ moves_loop: // When in check and at SpNode search starts from here // Futility pruning: parent node if (predictedDepth < 7 * ONE_PLY) { - futilityValue = ss->staticEval + futility_margin(predictedDepth) + 256; + futilityValue = ss->staticEval + futility_margin(predictedDepth) + 256; if (futilityValue <= alpha) { @@ -959,7 +959,10 @@ moves_loop: // When in check and at SpNode search starts from here [pos.piece_on(to_sq(move))][to_sq(move)] <= VALUE_ZERO)) ss->reduction += ONE_PLY; - if (move == countermove) + if ( move == countermove + || ( History[pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO + && CounterMovesHistory[pos.piece_on(prevMoveSq)][prevMoveSq] + [pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO)) ss->reduction = std::max(DEPTH_ZERO, ss->reduction - ONE_PLY); // Decrease reduction for moves that escape a capture @@ -975,13 +978,6 @@ moves_loop: // When in check and at SpNode search starts from here value = -search(pos, ss+1, -(alpha+1), -alpha, d, true); - // Re-search at intermediate depth if reduction is very high - if (value > alpha && ss->reduction >= 4 * ONE_PLY) - { - Depth d2 = std::max(newDepth - 2 * ONE_PLY, ONE_PLY); - value = -search(pos, ss+1, -(alpha+1), -alpha, d2, true); - } - doFullDepthSearch = (value > alpha && ss->reduction != DEPTH_ZERO); ss->reduction = DEPTH_ZERO; }