mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Pinned aware SEE
Don't allow pinned pieces to attack the exchange-square as long all pinners (this includes also potential ones) are on their original square. As soon a pinner moves to the exchange-square or get captured on it, we fall back to standard SEE behaviour. This correctly handles the majority of cases with absolute pins. bench: 6883133
This commit is contained in:
committed by
Marco Costalba
parent
4c95edddbf
commit
90ce24b11e
@@ -64,6 +64,7 @@ struct StateInfo {
|
||||
Piece capturedPiece;
|
||||
StateInfo* previous;
|
||||
Bitboard blockersForKing[COLOR_NB];
|
||||
Bitboard pinnersForKing[COLOR_NB];
|
||||
Bitboard checkSquares[PIECE_TYPE_NB];
|
||||
};
|
||||
|
||||
@@ -121,7 +122,7 @@ public:
|
||||
Bitboard attacks_from(Piece pc, Square s) const;
|
||||
template<PieceType> Bitboard attacks_from(Square s) const;
|
||||
template<PieceType> Bitboard attacks_from(Square s, Color c) const;
|
||||
Bitboard slider_blockers(Bitboard sliders, Square s) const;
|
||||
Bitboard slider_blockers(Bitboard sliders, Square s, Bitboard& pinners) const;
|
||||
|
||||
// Properties of moves
|
||||
bool legal(Move m) const;
|
||||
|
||||
Reference in New Issue
Block a user