1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 09:13:08 +00:00

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
This commit is contained in:
ElbertoOne 2018-07-18 08:36:23 +02:00 committed by Stéphane Nicolet
parent a05793517f
commit 2ac35027d5

View file

@ -560,9 +560,9 @@ namespace {
score += Hanging * popcount(weak & ~attackedBy[Them][ALL_PIECES]);
// Bonus for overload (non-pawn enemies attacked and defended exactly once)
// Bonus for overload (non-pawn enemies attacked once or more and defended exactly once)
b = nonPawnEnemies
& attackedBy[Us][ALL_PIECES] & ~attackedBy2[Us]
& attackedBy[Us][ALL_PIECES]
& attackedBy[Them][ALL_PIECES] & ~attackedBy2[Them];
score += Overload * popcount(b);
}