mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Introduce scale factor in pawn evaluation
The idea is to reduce the score if we have many pawns opposing an enemy pawn so that the draw possibility increases. Just introduced the logic, but no functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -430,6 +430,13 @@ Value do_evaluate(const Position& pos, EvalInfo& ei, int threadID) {
|
||||
factor[BLACK] = sf;
|
||||
}
|
||||
|
||||
// If we don't already have an unusual scale factor, use pawn
|
||||
// evaluation ones.
|
||||
if (factor[WHITE] == SCALE_FACTOR_NORMAL)
|
||||
factor[WHITE] = ei.pi->scale_factor(WHITE);
|
||||
if (factor[BLACK] == SCALE_FACTOR_NORMAL)
|
||||
factor[BLACK] = ei.pi->scale_factor(BLACK);
|
||||
|
||||
// Interpolate between the middle game and the endgame score
|
||||
Color stm = pos.side_to_move();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user