@@ -149,6 +149,7 @@ constexpr Score MobilityBonus[][32] = {
149149#ifdef Maverick
150150// Combo #1867 Jonathan D - others as noted
151151// Assorted bonuses and penalties
152+ constexpr Score AttacksOnSpaceArea = S ( 4 , 0 );
152153constexpr Score BishopPawns = S ( 3 , 7 );
153154constexpr Score CorneredBishop = S ( 50 , 50 );
154155constexpr Score FlankAttacks = S ( 8 , -2 ); // Fauzi
@@ -171,6 +172,7 @@ constexpr Score TrappedRook = S( 96, 4);
171172constexpr Score WeakQueen = S ( 10 , 2 ); // Gunther Dementz weak queen mod
172173#else
173174 // Assorted bonuses and penalties
175+ constexpr Score AttacksOnSpaceArea = S ( 4 , 0 );
174176 constexpr Score BishopPawns = S ( 3 , 7 );
175177 constexpr Score CorneredBishop = S ( 50 , 50 );
176178 constexpr Score FlankAttacks = S ( 8 , 0 );
@@ -814,6 +816,8 @@ constexpr Score WeakQueen = S( 10, 2); // Gunther Dementz weak queen m
814816 int weight = pos.count <ALL_PIECES>(Us) - 1 ;
815817 Score score = make_score (bonus * weight * weight / 16 , 0 );
816818
819+ score -= AttacksOnSpaceArea * popcount (attackedBy[Them][ALL_PIECES] & behind & safe);
820+
817821 if (T)
818822 Trace::add (SPACE, Us, score);
819823
0 commit comments