@@ -158,6 +158,7 @@ constexpr Score MobilityBonus[][32] = {
158158#ifdef Sullivan
159159// Combo #1867 Jonathan D
160160// Assorted bonuses and penalties
161+ constexpr Score AttacksOnSpaceArea = S ( 4 , 0 );
161162constexpr Score BishopPawns = S ( 3 , 7 );
162163constexpr Score CorneredBishop = S ( 50 , 50 );
163164constexpr Score FlankAttacks = S ( 7 , 0 );
@@ -180,6 +181,7 @@ constexpr Score TrappedRook = S( 96, 4);
180181constexpr Score WeakQueen = S ( 10 , 2 );// Gunther Dementz weak queen mod
181182#else
182183 // Assorted bonuses and penalties
184+ constexpr Score AttacksOnSpaceArea = S ( 4 , 0 );
183185 constexpr Score BishopPawns = S ( 3 , 7 );
184186 constexpr Score CorneredBishop = S ( 50 , 50 );
185187 constexpr Score FlankAttacks = S ( 8 , 0 );
@@ -823,6 +825,8 @@ constexpr Score WeakQueen = S( 10, 2);// Gunther Dementz weak queen mo
823825 int weight = pos.count <ALL_PIECES>(Us) - 1 ;
824826 Score score = make_score (bonus * weight * weight / 16 , 0 );
825827
828+ score -= AttacksOnSpaceArea * popcount (attackedBy[Them][ALL_PIECES] & behind & safe);
829+
826830 if (T)
827831 Trace::add (SPACE, Us, score);
828832
0 commit comments