mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 08:13:08 +00: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:
parent
53bbcb78d5
commit
6e06db93fd
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue