mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 02:27:00 +08:00
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 <mcostalba@gmail.com>
This commit is contained in:
@@ -274,7 +274,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns,
|
|||||||
if (isolated)
|
if (isolated)
|
||||||
{
|
{
|
||||||
value -= IsolatedPawnPenalty[f];
|
value -= IsolatedPawnPenalty[f];
|
||||||
if (!(theirPawns & file_bb(f)))
|
if (!opposed)
|
||||||
value -= IsolatedPawnPenalty[f] / 2;
|
value -= IsolatedPawnPenalty[f] / 2;
|
||||||
}
|
}
|
||||||
if (doubled)
|
if (doubled)
|
||||||
@@ -283,7 +283,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns,
|
|||||||
if (backward)
|
if (backward)
|
||||||
{
|
{
|
||||||
value -= BackwardPawnPenalty[f];
|
value -= BackwardPawnPenalty[f];
|
||||||
if (!(theirPawns & file_bb(f)))
|
if (!opposed)
|
||||||
value -= BackwardPawnPenalty[f] / 2;
|
value -= BackwardPawnPenalty[f] / 2;
|
||||||
}
|
}
|
||||||
if (chain)
|
if (chain)
|
||||||
|
|||||||
Reference in New Issue
Block a user