X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=f26ab959ba27ee829c9c07c9c4069b9b3a0a57ba;hp=f1136e3e5b423cfaed45bae25fbc591c341690a7;hb=6ed81f09ffa513f0938c1a16fa4edd55e552c178;hpb=272936eaba8d3a40f4d2d6649fb9a06912bd162c diff --git a/src/search.cpp b/src/search.cpp index f1136e3e..f26ab959 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -71,7 +71,7 @@ namespace { int Reductions[MAX_MOVES]; // [depth or moveNumber] Depth reduction(bool i, Depth d, int mn) { - int r = Reductions[d / ONE_PLY] * Reductions[mn] / 1024; + int r = Reductions[d / ONE_PLY] * Reductions[mn]; return ((r + 512) / 1024 + (!i && r > 1024)) * ONE_PLY; } @@ -149,7 +149,7 @@ namespace { void Search::init() { for (int i = 1; i < MAX_MOVES; ++i) - Reductions[i] = int(733.3 * std::log(i)); + Reductions[i] = int(22.9 * std::log(i)); } @@ -958,7 +958,7 @@ moves_loop: // When in check, search starts from here if ( !captureOrPromotion && !givesCheck - && !pos.advanced_pawn_push(move)) + && (!pos.advanced_pawn_push(move) || pos.non_pawn_material(~us) > BishopValueMg)) { // Move count based pruning (~30 Elo) if (moveCountPruning) @@ -984,7 +984,8 @@ moves_loop: // When in check, search starts from here if (!pos.see_ge(move, Value(-29 * lmrDepth * lmrDepth))) continue; } - else if (!pos.see_ge(move, -PawnValueEg * (depth / ONE_PLY))) // (~20 Elo) + else if ((!givesCheck || !(pos.blockers_for_king(~us) & from_sq(move))) + && !pos.see_ge(move, -PawnValueEg * (depth / ONE_PLY))) // (~20 Elo) continue; }