mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 03:26:24 +08:00
Tweak Mobility Area
Only consider pawns and the king as restricting.
This commit is contained in:
@@ -690,7 +690,7 @@ Value do_evaluate(const Position& pos, Value& margin, Info& ei) {
|
||||
Score score = mobility = SCORE_ZERO;
|
||||
|
||||
// Do not include in mobility squares protected by enemy pawns or occupied by our pieces
|
||||
const Bitboard mobilityArea = ~(ei.attackedBy[Them][PAWN] | pos.pieces(Us));
|
||||
const Bitboard mobilityArea = ~(ei.attackedBy[Them][PAWN] | pos.pieces(Us, PAWN, KING));
|
||||
|
||||
score += evaluate_pieces<KNIGHT, Us, Trace>(pos, ei, mobility, mobilityArea);
|
||||
score += evaluate_pieces<BISHOP, Us, Trace>(pos, ei, mobility, mobilityArea);
|
||||
|
||||
Reference in New Issue
Block a user