mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Piece mobility: filter out squares protected by pawns
Do not consider squares protected by enemy pawns in mobility evaluation. This reduces the mobility value by about 15% Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
dc4e2d8184
commit
d0804341c5
1 changed files with 4 additions and 1 deletions
|
@ -575,8 +575,11 @@ namespace {
|
|||
ei.kingAdjacentZoneAttacksCount[us] += count_1s_max_15(bb);
|
||||
}
|
||||
|
||||
// Remove squares protected by enemy pawns
|
||||
Bitboard bb = (b & ~ei.attackedBy[them][PAWN]);
|
||||
|
||||
// Mobility
|
||||
int mob = count_1s_max_15(b & ~p.pieces_of_color(us));
|
||||
int mob = count_1s_max_15(bb & ~p.pieces_of_color(us));
|
||||
ei.mgMobility += Sign[us] * mgBonus[mob];
|
||||
ei.egMobility += Sign[us] * egBonus[mob];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue