mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 23:56:23 +08:00
Normalize "pawn in front of minor" patch
No functional change.
This commit is contained in:
@@ -173,6 +173,7 @@ namespace {
|
|||||||
const Score RookOpenFile = make_score(43, 21);
|
const Score RookOpenFile = make_score(43, 21);
|
||||||
const Score RookSemiopenFile = make_score(19, 10);
|
const Score RookSemiopenFile = make_score(19, 10);
|
||||||
const Score BishopPawns = make_score( 8, 12);
|
const Score BishopPawns = make_score( 8, 12);
|
||||||
|
const Score MinorBehindPawn = make_score(16, 0);
|
||||||
const Score UndefendedMinor = make_score(25, 10);
|
const Score UndefendedMinor = make_score(25, 10);
|
||||||
const Score TrappedRook = make_score(90, 0);
|
const Score TrappedRook = make_score(90, 0);
|
||||||
|
|
||||||
@@ -536,10 +537,10 @@ Value do_evaluate(const Position& pos, Value& margin) {
|
|||||||
if (!(pos.pieces(Them, PAWN) & pawn_attack_span(Us, s)))
|
if (!(pos.pieces(Them, PAWN) & pawn_attack_span(Us, s)))
|
||||||
score += evaluate_outposts<Piece, Us>(pos, ei, s);
|
score += evaluate_outposts<Piece, Us>(pos, ei, s);
|
||||||
|
|
||||||
// Pawn in front of knight/bishop
|
// Bishop or knight behind a pawn
|
||||||
if ( relative_rank(Us, s) < RANK_5
|
if ( relative_rank(Us, s) < RANK_5
|
||||||
&& (pos.pieces(PAWN) & (s + pawn_push(Us))))
|
&& (pos.pieces(PAWN) & (s + pawn_push(Us))))
|
||||||
score += make_score(16, 0);
|
score += MinorBehindPawn;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (Piece == ROOK || Piece == QUEEN)
|
if ( (Piece == ROOK || Piece == QUEEN)
|
||||||
|
|||||||
Reference in New Issue
Block a user