mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
No Queen in the MobilityArea
Queen was recently excluded from the mobility area of friendly minor pieces. Exclude queen also from the mobility area of friendly majors too. Run as a simplification: STC http://tests.stockfishchess.org/tests/view/5ade396f0ebc59602d053742 LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 46972 W: 9511 L: 9437 D: 28024 LTC http://tests.stockfishchess.org/tests/view/5ade64b50ebc5949f20a24d3 LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 66855 W: 10157 L: 10105 D: 46593 How to continue from there? The mobilityArea is used in various places of the evaluation as a soft proxy for "not attacked by the opponent pawns". Now that the mobility area is getting smaller and smaller, it may be worth to hunt for Elo gains by trying the more direct ~attackedBy[Them][PAWN] instead of mobilityArea[Us] in these places. Bench: 4650572
This commit is contained in:
parent
c794c8c801
commit
45072612d4
1 changed files with 3 additions and 5 deletions
|
@ -258,9 +258,9 @@ namespace {
|
||||||
// Find our pawns that are blocked or on the first two ranks
|
// Find our pawns that are blocked or on the first two ranks
|
||||||
Bitboard b = pos.pieces(Us, PAWN) & (shift<Down>(pos.pieces()) | LowRanks);
|
Bitboard b = pos.pieces(Us, PAWN) & (shift<Down>(pos.pieces()) | LowRanks);
|
||||||
|
|
||||||
// Squares occupied by those pawns, by our king, or controlled by enemy pawns
|
// Squares occupied by those pawns, by our king or queen, or controlled by enemy pawns
|
||||||
// are excluded from the mobility area.
|
// are excluded from the mobility area.
|
||||||
mobilityArea[Us] = ~(b | pos.square<KING>(Us) | pe->pawn_attacks(Them));
|
mobilityArea[Us] = ~(b | pos.pieces(Us, KING, QUEEN) | pe->pawn_attacks(Them));
|
||||||
|
|
||||||
// Initialise attackedBy bitboards for kings and pawns
|
// Initialise attackedBy bitboards for kings and pawns
|
||||||
attackedBy[Us][KING] = pos.attacks_from<KING>(pos.square<KING>(Us));
|
attackedBy[Us][KING] = pos.attacks_from<KING>(pos.square<KING>(Us));
|
||||||
|
@ -301,7 +301,6 @@ namespace {
|
||||||
Bitboard b, bb;
|
Bitboard b, bb;
|
||||||
Square s;
|
Square s;
|
||||||
Score score = SCORE_ZERO;
|
Score score = SCORE_ZERO;
|
||||||
int mob;
|
|
||||||
|
|
||||||
attackedBy[Us][Pt] = 0;
|
attackedBy[Us][Pt] = 0;
|
||||||
|
|
||||||
|
@ -326,8 +325,7 @@ namespace {
|
||||||
kingAttacksCount[Us] += popcount(b & attackedBy[Them][KING]);
|
kingAttacksCount[Us] += popcount(b & attackedBy[Them][KING]);
|
||||||
}
|
}
|
||||||
|
|
||||||
mob = (Pt == KNIGHT || Pt == BISHOP) ? popcount(b & mobilityArea[Us] & ~pos.pieces(Us, QUEEN))
|
int mob = popcount(b & mobilityArea[Us]);
|
||||||
: popcount(b & mobilityArea[Us]);
|
|
||||||
|
|
||||||
mobility[Us] += MobilityBonus[Pt - 2][mob];
|
mobility[Us] += MobilityBonus[Pt - 2][mob];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue