mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
MobilityArea (simplified)
Based off of Pull request #383: Include squares occupied by some pawns in the MobilityArea a) not blocked b) on rank 4 and above c) or captures Passed STC LLR: 2.95 (-2.94,2.94) [-1.50,4.50] Total: 8157 W: 1644 L: 1516 D: 4997 And LTC LLR: 2.97 (-2.94,2.94) [0.00,6.00] Total: 26086 W: 4274 L: 4051 D: 17761 ----------- Then, a simplification test failed, trying to remove b and c) LLR: -2.95 (-2.94,2.94) [-3.00,1.00] Total: 6048 W: 1117 L: 1288 D: 3643 Another simplification test, was run to remove just (c) Passed STC LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 28073 W: 5364 L: 5255 D: 17454 And LTC LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 34652 W: 5448 L: 5348 D: 23856 A parameter tweak test showed that changing b) for "on rank 3 and above" does not work LLR: -2.95 (-2.94,2.94) [0.00,4.00] Total: 5233 W: 937 L: 1077 D: 3219 Finally, a small rewrite, and we have this version Include squares occupied by some pawns in the MobilityArea which are a) not blocked b) on rank 4 and above Bench: 8977899 Resolves #385
This commit is contained in:
committed by
Gary Linscott
parent
51330414c4
commit
4a6d59c6c7
@@ -701,9 +701,18 @@ namespace {
|
||||
ei.attackedBy[WHITE][ALL_PIECES] |= ei.attackedBy[WHITE][KING];
|
||||
ei.attackedBy[BLACK][ALL_PIECES] |= ei.attackedBy[BLACK][KING];
|
||||
|
||||
// Do not include in mobility squares protected by enemy pawns or occupied by our pawns or king
|
||||
Bitboard mobilityArea[] = { ~(ei.attackedBy[BLACK][PAWN] | pos.pieces(WHITE, PAWN, KING)),
|
||||
~(ei.attackedBy[WHITE][PAWN] | pos.pieces(BLACK, PAWN, KING)) };
|
||||
// Pawns blocked or on ranks 2 and 3. Will be excluded from the mobility area
|
||||
Bitboard blockedPawns[] = {
|
||||
pos.pieces(WHITE, PAWN) & (shift_bb<DELTA_S>(pos.pieces()) | Rank2BB | Rank3BB),
|
||||
pos.pieces(BLACK, PAWN) & (shift_bb<DELTA_N>(pos.pieces()) | Rank7BB | Rank6BB)
|
||||
};
|
||||
|
||||
// Do not include in mobility squares protected by enemy pawns, or occupied
|
||||
// by our blocked pawns or king.
|
||||
Bitboard mobilityArea[] = {
|
||||
~(ei.attackedBy[BLACK][PAWN] | blockedPawns[WHITE] | pos.king_square(WHITE)),
|
||||
~(ei.attackedBy[WHITE][PAWN] | blockedPawns[BLACK] | pos.king_square(BLACK))
|
||||
};
|
||||
|
||||
// Evaluate pieces and mobility
|
||||
score += evaluate_pieces<KNIGHT, WHITE, Trace>(pos, ei, mobility, mobilityArea);
|
||||
|
||||
Reference in New Issue
Block a user