From: Fabian Fichter Date: Sun, 16 Jun 2019 13:58:56 +0000 (+0200) Subject: Merge official-stockfish/master X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=0adf66ba2237675fb4cf8f39c3b3eb636b8a0009;p=fairystockfish.git Merge official-stockfish/master bench: 3512052 --- 0adf66ba2237675fb4cf8f39c3b3eb636b8a0009 diff --cc src/pawns.cpp index b4b1b6f,bbcadce..7c2a345 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@@ -214,13 -190,13 +214,13 @@@ void Entry::evaluate_shelter(const Posi for (File f = File(center - 1); f <= File(center + 1); ++f) { b = ourPawns & file_bb(f); - Rank ourRank = b ? relative_rank(Us, backmost_sq(Us, b), pos.max_rank()) : RANK_1; - Rank ourRank = b ? relative_rank(Us, frontmost_sq(Them, b)) : RANK_1; ++ Rank ourRank = b ? relative_rank(Us, frontmost_sq(Them, b), pos.max_rank()) : RANK_1; b = theirPawns & file_bb(f); - Rank theirRank = b ? relative_rank(Us, frontmost_sq(Them, b)) : RANK_1; + Rank theirRank = b ? relative_rank(Us, frontmost_sq(Them, b), pos.max_rank()) : RANK_1; - int d = std::min(f, ~f); - bonus[MG] += ShelterStrength[d][ourRank]; + int d = std::min(std::min(f, File(pos.max_file() - f)), FILE_D); + bonus[MG] += ShelterStrength[d][ourRank] * (1 + (pos.captures_to_hand() && ourRank <= RANK_2)); if (ourRank && (ourRank == theirRank - 1)) bonus[MG] -= 82 * (theirRank == RANK_3), bonus[EG] -= 82 * (theirRank == RANK_3); diff --cc src/search.cpp index 82655bf,d954389..fe011d9 --- a/src/search.cpp +++ b/src/search.cpp @@@ -1002,12 -977,11 +1002,12 @@@ moves_loop: // When in check, search st continue; // Prune moves with negative SEE (~10 Elo) - if (!pos.see_ge(move, Value(-29 * lmrDepth * lmrDepth))) + if (!pos.must_capture() && !pos.see_ge(move, Value(-29 * lmrDepth * lmrDepth))) continue; } - else if ((!givesCheck || !(pos.blockers_for_king(~us) & from_sq(move))) + else if ((!givesCheck || !extension) - && !pos.see_ge(move, -PawnValueEg * (depth / ONE_PLY))) // (~20 Elo) + && !pos.must_capture() + && !pos.see_ge(move, -(PawnValueEg + 120 * pos.captures_to_hand()) * (depth / ONE_PLY))) // (~20 Elo) continue; }