X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=f2e822d0b6b9f1dd65e70ff911880516bf05753c;hp=da76de100f00fcd8fb6326506f95356cb204cf86;hb=dab66631e8e31b86f91475f4245c4be6b36a37de;hpb=7cb8817ef2194737140410b07997fde9f777ef32 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index da76de10..f2e822d0 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -133,6 +133,7 @@ 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); @@ -711,6 +712,8 @@ namespace { 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);