X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=50eb3aa32c3871649cf242833b657ceec73ee497;hp=1ae65bf181bcb74dac8755704776bf95a31a3a4c;hb=3a3ca6af0390d74427c218f29cb5fe1a913efb42;hpb=270b241ec12ad3a32634a846b87ec9dc08fa2730 diff --git a/src/pawns.cpp b/src/pawns.cpp index 1ae65bf1..50eb3aa3 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -130,8 +130,8 @@ namespace { // Score this pawn if (support | phalanx) { - int v = Connected[r] * (phalanx ? 3 : 2) / (opposed ? 2 : 1) - + 17 * popcount(support); + int v = Connected[r] * (2 + bool(phalanx) - opposed) + + 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))