diff --git a/src/endgame.cpp b/src/endgame.cpp index a95ff3731..0639d7a10 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -172,8 +172,8 @@ Value Endgame::operator()(const Position& pos) const { template<> Value Endgame::operator()(const Position& pos) const { - assert(verify_material(pos, strongSide, VALUE_ZERO, 1)); - assert(verify_material(pos, weakSide, VALUE_ZERO, 0)); +assert(verify_material(pos, strongSide, VALUE_VIRTUAL_MATE, 1)); +assert(verify_material(pos, weakSide, VALUE_VIRTUAL_LOSS, 0)); // Assume strongSide is white and the pawn is on files A-D Square strongKing = normalize(pos, strongSide, pos.square(strongSide)); diff --git a/src/types.h b/src/types.h index 0c398412a..877e4435b 100644 --- a/src/types.h +++ b/src/types.h @@ -336,6 +336,7 @@ enum Value : int { VALUE_MATE = 32000, XBOARD_VALUE_MATE = 200000, VALUE_VIRTUAL_MATE = 3000, + VALUE_VIRTUAL_LOSS = -3000, VALUE_VIRTUAL_MATE_IN_MAX_PLY = VALUE_VIRTUAL_MATE - MAX_PLY, VALUE_INFINITE = 32001, VALUE_NONE = 32002, @@ -345,11 +346,11 @@ enum Value : int { VALUE_MATE_IN_MAX_PLY = VALUE_MATE - MAX_PLY, VALUE_MATED_IN_MAX_PLY = -VALUE_MATE_IN_MAX_PLY, - PawnValueMg = 126, PawnValueEg = 208, - KnightValueMg = 781, KnightValueEg = 854, - BishopValueMg = 825, BishopValueEg = 915, - RookValueMg = 1276, RookValueEg = 1380, - QueenValueMg = 2538, QueenValueEg = 2682, + PawnValueMg = 116, PawnValueEg = 186, + KnightValueMg = 261, KnightValueEg = 444, + BishopValueMg = 100, BishopValueEg = 100, + RookValueMg = 204, RookValueEg = 244, + QueenValueMg = 427, QueenValueEg = 798, FersValueMg = 420, FersValueEg = 450, AlfilValueMg = 350, AlfilValueEg = 330, FersAlfilValueMg = 700, FersAlfilValueEg = 650,