1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 00:33: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:
Marco Costalba 2009-01-10 16:11:33 +01:00
parent ec2927286a
commit 4b53bb02f6

View file

@ -586,7 +586,9 @@ namespace {
Bitboard bb = (b & ~ei.attackedBy[them][PAWN]);
// 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.egMobility += Sign[us] * EgBonus[Piece][mob];