From 7240a90bf9be3f39f3ca4f34921dd644c5cebb3a Mon Sep 17 00:00:00 2001 From: 31m059 <37052095+31m059@users.noreply.github.com> Date: Sat, 15 Dec 2018 01:55:25 -0500 Subject: [PATCH] Use stronglyProtected ~stronglyProtected is quite similar to ~attackedBy[Them][PAWN] & ~attackedBy2[Them], the only difference appears to be that the former includes squares attacked twice by both sides. The resulting logic is simpler, and the change appears to be at least Elo-neutral at both STC and LTC. STC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 35924 W: 7978 L: 7885 D: 20061 http://tests.stockfishchess.org/tests/view/5c14a5c00ebc5902ba11ed72 LTC: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 37078 W: 6125 L: 6030 D: 24923 http://tests.stockfishchess.org/tests/view/5c14ae880ebc5902ba11eed8 Bench: 3646542 --- src/evaluate.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index b58d4a03..333d04ac 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -560,8 +560,7 @@ namespace { // Bonus for restricting their piece moves restricted = attackedBy[Them][ALL_PIECES] - & ~attackedBy[Them][PAWN] - & ~attackedBy2[Them] + & ~stronglyProtected & attackedBy[Us][ALL_PIECES]; score += RestrictedPiece * popcount(restricted); -- 2.39.2