]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Simplify Overload condition
[stockfish] / src / evaluate.cpp
index f4186686b6a2a5d6083050e55fc91e760f7e883b..2fb0e55a9d47b08ed61fa7319aca386200140390 100644 (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);
     }