Merge official-stockfish/master
authorFabian Fichter <ianfab@users.noreply.github.com>
Sun, 16 Jun 2019 13:58:56 +0000 (15:58 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sun, 16 Jun 2019 13:58:56 +0000 (15:58 +0200)
bench: 3512052

1  2 
src/bitboard.h
src/endgame.cpp
src/pawns.cpp
src/search.cpp

diff --cc src/bitboard.h
Simple merge
diff --cc src/endgame.cpp
Simple merge
diff --cc 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
@@@ -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;
        }