};
// Endgame evaluation and scaling functions are accessed directly and not through
- // the function maps because they correspond to more then one material hash key.
+ // the function maps because they correspond to more than one material hash key.
Endgame<KmmKm> EvaluateKmmKm[] = { Endgame<KmmKm>(WHITE), Endgame<KmmKm>(BLACK) };
Endgame<KXK> EvaluateKXK[] = { Endgame<KXK>(WHITE), Endgame<KXK>(BLACK) };
(npm_w == npm_b || npm_b < RookValueMg ? 0 : NoPawnsSF[std::min(pos.count<BISHOP>(BLACK), 2)]);
}
+ if (pos.count<PAWN>(WHITE) == 1 && npm_w - npm_b <= BishopValueMg)
+ {
+ e->factor[WHITE] = (uint8_t) SCALE_FACTOR_ONEPAWN;
+ }
+
+ if (pos.count<PAWN>(BLACK) == 1 && npm_b - npm_w <= BishopValueMg)
+ {
+ e->factor[BLACK] = (uint8_t) SCALE_FACTOR_ONEPAWN;
+ }
+
// Compute the space weight
if (npm_w + npm_b >= 2 * QueenValueMg + 4 * RookValueMg + 2 * KnightValueMg)
{