]> git.sesse.net Git - stockfish/blobdiff - src/pawns.cpp
Extend castling independently of singular extension
[stockfish] / src / pawns.cpp
index f60411993fcc0877ed83a8a632f25945018aa9db..50eb3aa32c3871649cf242833b657ceec73ee497 100644 (file)
@@ -131,7 +131,7 @@ namespace {
         if (support | phalanx)
         {
             int v =  Connected[r] * (2 + bool(phalanx) - opposed)
-                   + 17 * popcount(support);
+                   + 21 * popcount(support);
 
             score += make_score(v, v * (r - 2) / 4);
         }
@@ -198,7 +198,7 @@ Score Entry::evaluate_shelter(const Position& pos, Square ksq) {
       b = theirPawns & file_bb(f);
       int theirRank = b ? relative_rank(Us, frontmost_sq(Them, b)) : 0;
 
-      int d = std::min(f, ~f);
+      File d = map_to_queenside(f);
       bonus += make_score(ShelterStrength[d][ourRank], 0);
 
       if (ourRank && (ourRank == theirRank - 1))