X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=866444a8388e29236d50ec4a609a59f11f45df74;hp=082be4f25587a7ec4d0e329b14890ae3c9446bb2;hb=368f976fb6fc9096d7f19b0443fb4d1af40eec14;hpb=4e72e2a964754611de85536c13ae069f85839b85 diff --git a/src/search.cpp b/src/search.cpp index 082be4f2..866444a8 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -594,7 +594,10 @@ namespace { // starts with statScore = 0. Later grandchildren start with the last calculated // statScore of the previous grandchild. This influences the reduction rules in // LMR which are based on the statScore of parent position. - (ss+2)->statScore = 0; + if (rootNode) + (ss + 4)->statScore = 0; + else + (ss + 2)->statScore = 0; // Step 4. Transposition table lookup. We don't want the score of a partial // search to overwrite a previous full search TT value, so we use a different @@ -1004,8 +1007,10 @@ moves_loop: // When in check, search starts from here // Step 16. Reduced depth search (LMR). If the move fails high it will be // re-searched at full depth. if ( depth >= 3 * ONE_PLY - && moveCount > 1 - && (!captureOrPromotion || moveCountPruning)) + && moveCount > 1 + 3 * rootNode + && ( !captureOrPromotion + || moveCountPruning + || ss->staticEval + PieceValue[EG][pos.captured_piece()] <= alpha)) { Depth r = reduction(improving, depth, moveCount);