- attackUnits = std::min(20, (ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) / 2)
- + 3 * (ei.kingAdjacentZoneAttacksCount[Them] + popcount<Max15>(undefended))
- + 2 * (ei.pinnedPieces[Us] != 0)
- - mg_value(score) / 32
- - !pos.count<QUEEN>(Them) * 15;
+ attackUnits = std::min(74, ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them])
+ + 8 * ei.kingAdjacentZoneAttacksCount[Them]
+ + 25 * popcount<Max15>(undefended)
+ + 11 * (ei.pinnedPieces[Us] != 0)
+ - mg_value(score) * 31 / 256
+ - !pos.count<QUEEN>(Them) * 60;