X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fevaluate.cpp;h=10dddc7de009c7c02251feb037c02e1793c83b75;hb=3ec362e4b299128b91d961250b444d930b4c60fa;hp=9a67a8e429024aa8f5453281c450aacbe322028d;hpb=7090d2561ae9ce3803bbc04319c4c93f756a6df2;p=stockfish diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 9a67a8e4..10dddc7d 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -133,7 +133,6 @@ namespace { }; // Assorted bonuses and penalties - constexpr Score AttacksOnSpaceArea = S( 4, 0); constexpr Score BishopPawns = S( 3, 7); constexpr Score CorneredBishop = S( 50, 50); constexpr Score FlankAttacks = S( 8, 0); @@ -705,12 +704,10 @@ namespace { behind |= shift(behind); behind |= shift(behind); - int bonus = popcount(safe) + popcount(behind & safe); + int bonus = popcount(safe) + popcount(behind & safe & ~attackedBy[Them][ALL_PIECES]); int weight = pos.count(Us) - 1; Score score = make_score(bonus * weight * weight / 16, 0); - score -= AttacksOnSpaceArea * popcount(attackedBy[Them][ALL_PIECES] & behind & safe); - if (T) Trace::add(SPACE, Us, score);