mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 15:37:47 +00:00
Scale down endgames with pawns on one or two adjacent files
This commit is contained in:
+4
-5
@@ -204,13 +204,12 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
b = e->semiopenFiles[Us] ^ 0xFF;
|
||||
e->pawnSpan[Us] = b ? int(msb(b) - lsb(b)) : 0;
|
||||
|
||||
// In endgame it's better to have pawns on both wings. So give a bonus according
|
||||
// to file distance between left and right outermost pawns.
|
||||
if (pos.count<PAWN>(Us) > 1)
|
||||
{
|
||||
b = e->semiopenFiles[Us] ^ 0xFF;
|
||||
value += PawnsFileSpan * int(msb(b) - lsb(b));
|
||||
}
|
||||
value += PawnsFileSpan * e->pawnSpan[Us];
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user