Skip to content

Commit 0ae0045

Browse files
committed
Tweak RestrictedPiece bonus
Double the "RestrictedPiece" bonus for restricted moves targeting occupied squares. STC LLR: 3.58 (-2.94,2.94) {-1.00,3.00} Total: 25504 W: 4887 L: 4697 D: 15920 Ptnml(0-2): 387, 2935, 5947, 3051, 422 https://tests.stockfishchess.org/tests/view/5e2aa15dab2d69d58394f94d LTC LLR: 2.94 (-2.94,2.94) {0.00,2.00} Total: 28572 W: 3826 L: 3621 D: 21125 Ptnml(0-2): 224, 2609, 8403, 2791, 239 https://tests.stockfishchess.org/tests/view/5e2ae7f4ab2d69d58394f9a6 Bench: 4719086
1 parent 01b6088 commit 0ae0045

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/evaluate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,11 +520,11 @@ namespace {
520520
}
521521

522522
// Bonus for restricting their piece moves
523+
// Greater bonus when landing square is occupied
523524
b = attackedBy[Them][ALL_PIECES]
524525
& ~stronglyProtected
525526
& attackedBy[Us][ALL_PIECES];
526-
527-
score += RestrictedPiece * popcount(b);
527+
score += RestrictedPiece * (popcount(b) + popcount(b & pos.pieces()));
528528

529529
// Protected or unattacked squares
530530
safe = ~attackedBy[Them][ALL_PIECES] | attackedBy[Us][ALL_PIECES];

0 commit comments

Comments
 (0)