From 6e06db93fde225eeae75dc8b3d5d1432c5cd14a8 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 17 Jul 2010 17:32:54 +0100 Subject: [PATCH] Fix isolated and backward pawns scoring It is more clear and also more correct because we consider enemy pawns only in fornt of us and not just on our file. Very small functional change, almost not measurable, but keep the patch for documenting purposes. Spotted by Marek Kwiatkowski. Signed-off-by: Marco Costalba --- src/pawns.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pawns.cpp b/src/pawns.cpp index 1cdeb461..34c25959 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -274,7 +274,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns, if (isolated) { value -= IsolatedPawnPenalty[f]; - if (!(theirPawns & file_bb(f))) + if (!opposed) value -= IsolatedPawnPenalty[f] / 2; } if (doubled) @@ -283,7 +283,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns, if (backward) { value -= BackwardPawnPenalty[f]; - if (!(theirPawns & file_bb(f))) + if (!opposed) value -= BackwardPawnPenalty[f] / 2; } if (chain) -- 2.39.2