mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
Retire "Pawn Structure" UCI option
Almost useless for the user and now is in sync with the material value that is already weighted. A small speedup of 0,4% because we avoid an apply_weight() call in a fast path. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -61,7 +61,14 @@ namespace {
|
||||
S(34,68), S(83,166), S(0, 0), S( 0, 0)
|
||||
};
|
||||
|
||||
const Score PawnStructureWeight = S(233, 201);
|
||||
|
||||
#undef S
|
||||
|
||||
inline Score apply_weight(Score v, Score w) {
|
||||
return make_score((int(mg_value(v)) * mg_value(w)) / 0x100,
|
||||
(int(eg_value(v)) * eg_value(w)) / 0x100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,9 +102,12 @@ PawnInfo* PawnInfoTable::get_pawn_info(const Position& pos) const {
|
||||
pi->pawnAttacks[WHITE] = ((wPawns << 9) & ~FileABB) | ((wPawns << 7) & ~FileHBB);
|
||||
pi->pawnAttacks[BLACK] = ((bPawns >> 7) & ~FileABB) | ((bPawns >> 9) & ~FileHBB);
|
||||
|
||||
// Evaluate pawns for both colors
|
||||
// Evaluate pawns for both colors and weight the result
|
||||
pi->value = evaluate_pawns<WHITE>(pos, wPawns, bPawns, pi)
|
||||
- evaluate_pawns<BLACK>(pos, bPawns, wPawns, pi);
|
||||
|
||||
pi->value = apply_weight(pi->value, PawnStructureWeight);
|
||||
|
||||
return pi;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user