mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Fix a very old bug in queen mobility
For queen mobility could be bigger then 15, so we need count_1s() not count_1s_max_15(). This bug was introduced by patch: "Group common evaluate code" of 24/9/2008 So it's almost 4 months and two release old! Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
ec2927286a
commit
4b53bb02f6
1 changed files with 3 additions and 1 deletions
|
@ -586,7 +586,9 @@ namespace {
|
||||||
Bitboard bb = (b & ~ei.attackedBy[them][PAWN]);
|
Bitboard bb = (b & ~ei.attackedBy[them][PAWN]);
|
||||||
|
|
||||||
// Mobility
|
// Mobility
|
||||||
int mob = count_1s_max_15(bb & ~p.pieces_of_color(us));
|
int mob = (Piece != QUEEN ? count_1s_max_15(bb & ~p.pieces_of_color(us))
|
||||||
|
: count_1s(bb & ~p.pieces_of_color(us)));
|
||||||
|
|
||||||
ei.mgMobility += Sign[us] * MgBonus[Piece][mob];
|
ei.mgMobility += Sign[us] * MgBonus[Piece][mob];
|
||||||
ei.egMobility += Sign[us] * EgBonus[Piece][mob];
|
ei.egMobility += Sign[us] * EgBonus[Piece][mob];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue