+ + push_close(winnerKSq, loserKSq);
+
+ return strongSide == pos.side_to_move() ? result : -result;
+}
+
+
+/// KNN vs KP. Very drawish, but there are some mate opportunities if we can
+// press the weakSide King to a corner before the pawn advances too much.
+template<>
+Value Endgame<KNNKP>::operator()(const Position& pos) const {
+
+ assert(verify_material(pos, strongSide, 2 * KnightValueMg, 0));
+ assert(verify_material(pos, weakSide, VALUE_ZERO, 1));
+
+ Value result = PawnValueEg
+ + 2 * PushToEdges[pos.square<KING>(weakSide)]
+ - 10 * relative_rank(weakSide, pos.square<PAWN>(weakSide));