Skip to content

Commit 27e9fc1

Browse files
committed
Normalize "pawn in front of minor" patch
No functional change.
1 parent e005270 commit 27e9fc1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/evaluate.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ namespace {
173173
const Score RookOpenFile = make_score(43, 21);
174174
const Score RookSemiopenFile = make_score(19, 10);
175175
const Score BishopPawns = make_score( 8, 12);
176+
const Score MinorBehindPawn = make_score(16, 0);
176177
const Score UndefendedMinor = make_score(25, 10);
177178
const Score TrappedRook = make_score(90, 0);
178179

@@ -536,10 +537,10 @@ Value do_evaluate(const Position& pos, Value& margin) {
536537
if (!(pos.pieces(Them, PAWN) & pawn_attack_span(Us, s)))
537538
score += evaluate_outposts<Piece, Us>(pos, ei, s);
538539

539-
// Pawn in front of knight/bishop
540+
// Bishop or knight behind a pawn
540541
if ( relative_rank(Us, s) < RANK_5
541542
&& (pos.pieces(PAWN) & (s + pawn_push(Us))))
542-
score += make_score(16, 0);
543+
score += MinorBehindPawn;
543544
}
544545

545546
if ( (Piece == ROOK || Piece == QUEEN)

0 commit comments

Comments
 (0)