Skip to content

Commit 2bfaf45

Browse files
committed
Re-introduce "keep pawns on both flanks"
Re-introduce the "keep pawns on both flanks" idea. STC yellow: LLR: -2.95 (-2.94,2.94) [0.00,5.00] Total: 93279 W: 20175 L: 19853 D: 53251 http://tests.stockfishchess.org/tests/view/5b8a00370ebc592cf274916a LTC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 11440 W: 1960 L: 1792 D: 7688 http://tests.stockfishchess.org/tests/view/5b8a329f0ebc592cf2749615 Closes #1761 Bench: 4609645
1 parent f923dc0 commit 2bfaf45

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/evaluate.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,12 +758,16 @@ namespace {
758758
int outflanking = distance<File>(pos.square<KING>(WHITE), pos.square<KING>(BLACK))
759759
- distance<Rank>(pos.square<KING>(WHITE), pos.square<KING>(BLACK));
760760

761+
bool pawnsOnBothFlanks = (pos.pieces(PAWN) & QueenSide)
762+
&& (pos.pieces(PAWN) & KingSide);
763+
761764
// Compute the initiative bonus for the attacking side
762765
int complexity = 8 * pe->pawn_asymmetry()
763766
+ 12 * pos.count<PAWN>()
764767
+ 12 * outflanking
768+
+ 16 * pawnsOnBothFlanks
765769
+ 48 * !pos.non_pawn_material()
766-
-110 ;
770+
-118 ;
767771

768772
// Now apply the bonus: note that we find the attacking side by extracting
769773
// the sign of the endgame value, and that we carefully cap the bonus so

0 commit comments

Comments
 (0)