X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=727990dc9d354b753004ae37b61afd7f2c1d28ad;hp=cbc5038ab901889e3e875c901f07309481501349;hb=7e9f776fcafe0121c7449f4339b26d77c14adf50;hpb=3f1bc9e01301d617f530b05207c4067df92543f0 diff --git a/src/search.cpp b/src/search.cpp index cbc5038a..727990dc 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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