Normalize "pawn in front of minor" patch
authorMarco Costalba <mcostalba@gmail.com>
Sat, 17 Aug 2013 09:05:55 +0000 (11:05 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 17 Aug 2013 09:05:55 +0000 (11:05 +0200)
No functional change.

src/evaluate.cpp

index daa911e682fefaa4d2753e2077e4b0837261b58d..12634ddd56b0a41ec937d88e3073dd9e623c378d 100644 (file)
@@ -173,6 +173,7 @@ namespace {
   const Score RookOpenFile     = make_score(43, 21);
   const Score RookSemiopenFile = make_score(19, 10);
   const Score BishopPawns      = make_score( 8, 12);
+  const Score MinorBehindPawn  = make_score(16,  0);
   const Score UndefendedMinor  = make_score(25, 10);
   const Score TrappedRook      = make_score(90,  0);
 
@@ -536,10 +537,10 @@ Value do_evaluate(const Position& pos, Value& margin) {
             if (!(pos.pieces(Them, PAWN) & pawn_attack_span(Us, s)))
                 score += evaluate_outposts<Piece, Us>(pos, ei, s);
 
-            // Pawn in front of knight/bishop
+            // Bishop or knight behind a pawn
             if (    relative_rank(Us, s) < RANK_5
                 && (pos.pieces(PAWN) & (s + pawn_push(Us))))
-                score += make_score(16, 0);
+                score += MinorBehindPawn;
         }
 
         if (  (Piece == ROOK || Piece == QUEEN)