No influence on unsafeSquares of passers by pieces
authorLolligerhans <lolligerhans@gmx.de>
Tue, 16 Jul 2019 08:14:09 +0000 (10:14 +0200)
committerStéphane Nicolet <cassio@free.fr>
Thu, 25 Jul 2019 06:23:43 +0000 (08:23 +0200)
Remove their pieces from influencing 'unsafeSquares' in passer
evaluation.

STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 36421 W: 8170 L: 8078 D: 20173
http://tests.stockfishchess.org/tests/view/5d22fc8e0ebc5925cf0cb26e

LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 18927 W: 3253 L: 3129 D: 12545
http://tests.stockfishchess.org/tests/view/5d26e2b20ebc5925cf0d3218

Closes https://github.com/official-stockfish/Stockfish/pull/2248

Bench: 3285659

src/evaluate.cpp

index 10dddc7de009c7c02251feb037c02e1793c83b75..23af60f36aede2d1adfa93eed2a04d56b8bd11a8 100644 (file)
@@ -641,7 +641,7 @@ namespace {
                 bb = forward_file_bb(Them, s) & pos.pieces(ROOK, QUEEN);
 
                 if (!(pos.pieces(Them) & bb))
-                    unsafeSquares &= attackedBy[Them][ALL_PIECES] | pos.pieces(Them);
+                    unsafeSquares &= attackedBy[Them][ALL_PIECES];
 
                 // If there are no enemy attacks on passed pawn span, assign a big bonus.
                 // Otherwise assign a smaller bonus if the path to queen is not attacked