X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fendgame.cpp;h=f9feb00e067b5dd8bd2aa18af4e9ac1f2e28fcbd;hb=141caf1d5b642bab826e2e8a7ab043b8c4928250;hp=913be63f1702c21eb4d76277c2cc4a6daaeb3954;hpb=94b9c65e09b5d396bebb29b62d9979139b5fbdfa;p=stockfish diff --git a/src/endgame.cpp b/src/endgame.cpp index 913be63f..f9feb00e 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -357,7 +357,7 @@ Value EvaluationFunction::apply(const Position& pos) const { result += Value(square_distance(bksq, nsq) * 32); // Bonus for restricting the knight's mobility - result += Value((8 - count_1s_max_15(pos.attacks_from(nsq))) * 8); + result += Value((8 - count_1s(pos.attacks_from(nsq))) * 8); return strongerSide == pos.side_to_move() ? result : -result; } @@ -367,12 +367,12 @@ Value EvaluationFunction::apply(const Position& pos) const { /// king alone are always draw. template<> Value EvaluationFunction::apply(const Position&) const { - return VALUE_ZERO; + return VALUE_DRAW; } template<> Value EvaluationFunction::apply(const Position&) const { - return VALUE_ZERO; + return VALUE_DRAW; } /// KBPKScalingFunction scales endgames where the stronger side has king,