X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=a65f2338d1fee51f3c6301f69d2e383c7e0c6785;hp=448c1191f25f4c92a206fd4d8826c92052cf4fff;hb=a0486ecb40513db8141fa27c026f64771b8ebb55;hpb=d5d23bfd2daecba0cb08459938a4d4806204c6d4 diff --git a/src/pawns.cpp b/src/pawns.cpp index 448c1191..a65f2338 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -31,18 +31,14 @@ namespace { #define V Value #define S(mg, eg) make_score(mg, eg) - // Isolated pawn penalty + // Pawn penalties constexpr Score Isolated = S(13, 16); - - // Backward pawn penalty constexpr Score Backward = S(17, 11); + constexpr Score Doubled = S(13, 40); // Connected pawn bonus by opposed, phalanx, #support and rank Score Connected[2][2][3][RANK_NB]; - // Doubled pawn penalty - constexpr Score Doubled = S(13, 40); - // 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. constexpr Value ShelterStrength[int(FILE_NB) / 2][RANK_NB] = { @@ -53,7 +49,7 @@ namespace { }; // Danger of enemy pawns moving toward our king by [distance from edge][rank]. - // RANK_1 = 0 is used for files where the enemy has no pawn, or their pawn + // RANK_1 = 0 is used for files where the enemy has no pawn, or their pawn // is behind our king. constexpr Value UnblockedStorm[int(FILE_NB) / 2][RANK_NB] = { { V( 25), V( 79), V(107), V( 51), V( 27), V( 0), V( 0) },