X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=291d40b6858c8a1e193c42f7debceede349af125;hp=8d6f812a6d56cf5607e06f51c903f96cad0fc01f;hb=6ed81f09ffa513f0938c1a16fa4edd55e552c178;hpb=5f4d44fda053335ab20cb67c99323b8c182bf824 diff --git a/src/pawns.cpp b/src/pawns.cpp index 8d6f812a..291d40b6 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -37,7 +37,7 @@ namespace { constexpr Score Isolated = S( 5, 15); // Connected pawn bonus - constexpr int Connected[RANK_NB] = { 0, 13, 17, 24, 59, 96, 171 }; + constexpr int Connected[RANK_NB] = { 0, 7, 8, 12, 29, 48, 86 }; // Strength of pawn shelter for our king by [distance from edge][rank]. // RANK_1 = 0 is used for files where we have no pawn, or pawn is behind our king. @@ -126,8 +126,9 @@ namespace { // Score this pawn if (support | phalanx) { - int v = (phalanx ? 3 : 2) * Connected[r]; - v = 17 * popcount(support) + (v >> (opposed + 1)); + int v = Connected[r] * (phalanx ? 3 : 2) / (opposed ? 2 : 1) + + 17 * popcount(support); + score += make_score(v, v * (r - 2) / 4); } else if (!neighbours)