From: Joona Kiiski Date: Wed, 17 Jun 2009 08:07:16 +0000 (+0300) Subject: Bugfix: KRK was not classified as KNOWN_WIN X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=46c0bdb74f104aa8a293c660689f84aae3ca75b3 Bugfix: KRK was not classified as KNOWN_WIN Problem is that npMaterial is compared to _endgame_ value of rook, although npMaterial is always (also in endgame!) calculated using _middlegame_ values. Bug was hidden as long as Rook middlegame and endgame values were same. Signed-off-by: Marco Costalba --- diff --git a/src/material.cpp b/src/material.cpp index f3d22776..845519bc 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -143,14 +143,14 @@ MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) { else if ( pos.non_pawn_material(BLACK) == Value(0) && pos.piece_count(BLACK, PAWN) == 0 - && pos.non_pawn_material(WHITE) >= RookValueEndgame) + && pos.non_pawn_material(WHITE) >= RookValueMidgame) { mi->evaluationFunction = &EvaluateKXK; return mi; } else if ( pos.non_pawn_material(WHITE) == Value(0) && pos.piece_count(WHITE, PAWN) == 0 - && pos.non_pawn_material(BLACK) >= RookValueEndgame) + && pos.non_pawn_material(BLACK) >= RookValueMidgame) { mi->evaluationFunction = &EvaluateKKX; return mi;