Remove condition for pawn threats
authorprotonspring <mike@whiteley.org>
Thu, 26 Jul 2018 07:34:14 +0000 (09:34 +0200)
committerStéphane Nicolet <cassio@free.fr>
Thu, 26 Jul 2018 07:34:22 +0000 (09:34 +0200)
It appears as though removing squares that are already attacked
by our pawns can be removed.

STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 51242 W: 11503 L: 11440 D: 28299
http://tests.stockfishchess.org/tests/view/5b58b5a40ebc5902bdb88f52

LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 35246 W: 6063 L: 5966 D: 23217
http://tests.stockfishchess.org/tests/view/5b58f8e20ebc5902bdb8959b

How to continue after this patch: there is now a slight semantic
overlap between the ThreatByPawnPush and the ThreatBySafePawn bonuses,
so hand-tuning either of these, or both at the same time, is natural.

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

Bench 4734881

src/evaluate.cpp

index ac9cf90bdcb314aad1198af283f0ab8d9662eb6c..bbab9c5032e09aaba7cba6f7c544721b76253db9 100644 (file)
@@ -586,10 +586,7 @@ namespace {
         & (attackedBy[Us][ALL_PIECES] | ~attackedBy[Them][ALL_PIECES]);
 
     // Bonus for safe pawn threats on the next move
-    b =   pawn_attacks_bb<Us>(b)
-       &  pos.pieces(Them)
-       & ~attackedBy[Us][PAWN];
-
+    b = pawn_attacks_bb<Us>(b) & pos.pieces(Them);
     score += ThreatByPawnPush * popcount(b);
 
     // Bonus for threats on the next moves against enemy queen