]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Two simplifications in passed pawns evaluation
[stockfish] / src / evaluate.cpp
index c2e7efef44ce9f0bb3fd6d799f11e4c7398c8f54..261bb47905bf68c51f027b8b11d3385540e32a97 100644 (file)
@@ -159,7 +159,6 @@ namespace {
   constexpr Score CloseEnemies       = S(  6,  0);
   constexpr Score CorneredBishop     = S( 50, 50);
   constexpr Score Hanging            = S( 57, 32);
-  constexpr Score HinderPassedPawn   = S(  8,  0);
   constexpr Score KingProtector      = S(  6,  6);
   constexpr Score KnightOnQueen      = S( 21, 11);
   constexpr Score LongDiagonalBishop = S( 46,  0);
@@ -638,9 +637,6 @@ namespace {
 
         assert(!(pos.pieces(Them, PAWN) & forward_file_bb(Us, s + Up)));
 
-        if (forward_file_bb(Us, s) & pos.pieces(Them))
-            score -= HinderPassedPawn;
-
         int r = relative_rank(Us, s);
         int w = PassedDanger[r];
 
@@ -688,8 +684,6 @@ namespace {
 
                 bonus += make_score(k * w, k * w);
             }
-            else if (pos.pieces(Us) & blockSq)
-                bonus += make_score(w + r * 2, w + r * 2);
         } // w != 0
 
         // Scale down bonus for candidate passers which need more than one