@@ -197,7 +197,6 @@ namespace {
197197 const Score WeakQueen = S(50 , 10 );
198198 const Score Hanging = S(48 , 27 );
199199 const Score ThreatByPawnPush = S(38 , 22 );
200- const Score Unstoppable = S( 0 , 45 );
201200 const Score PawnlessFlank = S(20 , 80 );
202201 const Score HinderPassedPawn = S( 7 , 0 );
203202 const Score ThreatByRank = S(16 , 3 );
@@ -678,6 +677,10 @@ namespace {
678677 mbonus += rr + r * 2 , ebonus += rr + r * 2 ;
679678 } // rr != 0
680679
680+ // Assign a small bonus when no pieces left (unstoppable)
681+ if (!pos.non_pawn_material (Us) && !pos.non_pawn_material (Them))
682+ ebonus += 20 ;
683+
681684 score += make_score (mbonus, ebonus) + PassedFile[file_of (s)];
682685 }
683686
@@ -852,16 +855,6 @@ Value Eval::evaluate(const Position& pos) {
852855 score += evaluate_passed_pawns<WHITE, DoTrace>(pos, ei)
853856 - evaluate_passed_pawns<BLACK, DoTrace>(pos, ei);
854857
855- // If both sides have only pawns, score for potential unstoppable pawns
856- if (!pos.non_pawn_material (WHITE) && !pos.non_pawn_material (BLACK))
857- {
858- if (ei.pi ->passed_pawns (WHITE))
859- score += Unstoppable;
860-
861- if (ei.pi ->passed_pawns (BLACK))
862- score -= Unstoppable;
863- }
864-
865858 // Evaluate space for both sides, only during opening
866859 if (pos.non_pawn_material (WHITE) + pos.non_pawn_material (BLACK) >= 12222 )
867860 score += evaluate_space<WHITE>(pos, ei)
0 commit comments