X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=964a3870b7ded986f721b46f35fab93f23332e77;hp=31419146667d95918d2a14ff311c2214763fb29f;hb=c08e05b494d54c7fc28621204382d77d3595d436;hpb=c9f80660a6c529f6909c1beed4e9d5798979711b diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 31419146..964a3870 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -79,9 +79,9 @@ namespace { constexpr Bitboard Center = (FileDBB | FileEBB) & (Rank4BB | Rank5BB); constexpr Bitboard KingFlank[FILE_NB] = { - QueenSide, QueenSide, QueenSide, + QueenSide ^ FileDBB, QueenSide, QueenSide, CenterFiles, CenterFiles, - KingSide, KingSide, KingSide + KingSide, KingSide, KingSide ^ FileEBB }; // Threshold for lazy and space evaluation @@ -159,13 +159,13 @@ namespace { constexpr Score CloseEnemies = S( 6, 0); constexpr Score CorneredBishop = S( 50, 50); constexpr Score Hanging = S( 52, 30); - constexpr Score HinderPassedPawn = S( 4, 0); + constexpr Score HinderPassedPawn = S( 8, 0); constexpr Score KingProtector = S( 6, 6); constexpr Score KnightOnQueen = S( 21, 11); constexpr Score LongDiagonalBishop = S( 22, 0); constexpr Score MinorBehindPawn = S( 16, 0); constexpr Score Overload = S( 13, 6); - constexpr Score PawnlessFlank = S( 20, 80); + constexpr Score PawnlessFlank = S( 19, 84); constexpr Score RookOnPawn = S( 8, 24); constexpr Score SliderOnQueen = S( 42, 21); constexpr Score ThreatByKing = S( 23, 76); @@ -636,8 +636,8 @@ namespace { assert(!(pos.pieces(Them, PAWN) & forward_file_bb(Us, s + Up))); - bb = forward_file_bb(Us, s) & pos.pieces(Them); - score -= HinderPassedPawn * popcount(bb); + if (forward_file_bb(Us, s) & pos.pieces(Them)) + score -= HinderPassedPawn; int r = relative_rank(Us, s); int w = PassedDanger[r];