]> git.sesse.net Git - stockfish/commitdiff
Exclude queen from Rook Contact Check computation
authorAlain SAVARD <support@multicim.com>
Sat, 18 Apr 2015 21:12:56 +0000 (22:12 +0100)
committerJoona Kiiski <joona.kiiski@gmail.com>
Sat, 18 Apr 2015 21:17:46 +0000 (22:17 +0100)
In ei.attackedBy, Queen does not x-ray through Rook, but the Rook does
X-ray through the Queen.

So most of the rook contact checks supported by queen are, in fact,
Queen Contact Checks and they are already scored separately.

Bench: 7762189

Resolves #338

src/evaluate.cpp

index b50792da85a05ae5ad85f3557543cb01bbfc69d6..563e707ffe48df1c01d0e65dd5b4cbb7fb03e2f9 100644 (file)
@@ -438,7 +438,7 @@ namespace {
         {
             // ...and then remove squares not supported by another enemy piece
             b &= (  ei.attackedBy[Them][PAWN]   | ei.attackedBy[Them][KNIGHT]
-                  | ei.attackedBy[Them][BISHOP] | ei.attackedBy[Them][QUEEN]);
+                  | ei.attackedBy[Them][BISHOP]);
 
             if (b)
                 attackUnits += RookContactCheck * popcount<Max15>(b);