Skip to content

Commit 2ac3502

Browse files
ElbertoOnesnicolet
authored andcommitted
Simplify Overload condition
Extend the bonus for Overload to cases where our side has more than one attacker to a non pawn piece. Based on an idea by Bryan in the forum. For instance, now black gets the overload bonus in this position: 8/5R1k/6pb/p6p/P1N4P/1Pp5/2K3P1/2N4r b - - 6 46 because two black pieces are attacking the knight on c1 that is defended only by the king. STC LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 57446 W: 12762 L: 12711 D: 31973 http://tests.stockfishchess.org/tests/view/5b4ca9970ebc5902bdb77a88 LTC LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 42113 W: 7295 L: 7209 D: 27609 http://tests.stockfishchess.org/tests/view/5b4ccea00ebc5902bdb77f69 Bench: 4667263
1 parent a057935 commit 2ac3502

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
@@ -560,9 +560,9 @@ namespace {
560560

561561
score += Hanging * popcount(weak & ~attackedBy[Them][ALL_PIECES]);
562562

563-
// Bonus for overload (non-pawn enemies attacked and defended exactly once)
563+
// Bonus for overload (non-pawn enemies attacked once or more and defended exactly once)
564564
b = nonPawnEnemies
565-
& attackedBy[Us][ALL_PIECES] & ~attackedBy2[Us]
565+
& attackedBy[Us][ALL_PIECES]
566566
& attackedBy[Them][ALL_PIECES] & ~attackedBy2[Them];
567567
score += Overload * popcount(b);
568568
}

0 commit comments

Comments
 (0)