From: ElbertoOne Date: Wed, 18 Jul 2018 06:36:23 +0000 (+0200) Subject: Simplify Overload condition X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=2ac35027d5900a641559fae7b22a994f8b4c2d72 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 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index f4186686..2fb0e55a 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -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); }