Skip to content

Commit 7240a90

Browse files
31m059snicolet
authored andcommitted
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
1 parent 64a6138 commit 7240a90

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/evaluate.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,7 @@ namespace {
560560

561561
// Bonus for restricting their piece moves
562562
restricted = attackedBy[Them][ALL_PIECES]
563-
& ~attackedBy[Them][PAWN]
564-
& ~attackedBy2[Them]
563+
& ~stronglyProtected
565564
& attackedBy[Us][ALL_PIECES];
566565
score += RestrictedPiece * popcount(restricted);
567566

0 commit comments

Comments
 (0)