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:
Guenther Demetz
2016-09-12 08:47:19 +02:00
committed by Marco Costalba
parent 4c95edddbf
commit 90ce24b11e
3 changed files with 36 additions and 16 deletions

View File

@@ -360,7 +360,8 @@ namespace {
if (Pt == QUEEN)
{
// Penalty if any relative pin or discovered attack against the queen
if (pos.slider_blockers(pos.pieces(Them, ROOK, BISHOP), s))
Bitboard pinners;
if (pos.slider_blockers(pos.pieces(Them, ROOK, BISHOP), s, pinners))
score -= WeakQueen;
}
}