mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
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 <mcostalba@gmail.com>
This commit is contained in:
parent
8225fdd5bb
commit
46c0bdb74f
1 changed files with 2 additions and 2 deletions
|
@ -143,14 +143,14 @@ MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) {
|
||||||
|
|
||||||
else if ( pos.non_pawn_material(BLACK) == Value(0)
|
else if ( pos.non_pawn_material(BLACK) == Value(0)
|
||||||
&& pos.piece_count(BLACK, PAWN) == 0
|
&& pos.piece_count(BLACK, PAWN) == 0
|
||||||
&& pos.non_pawn_material(WHITE) >= RookValueEndgame)
|
&& pos.non_pawn_material(WHITE) >= RookValueMidgame)
|
||||||
{
|
{
|
||||||
mi->evaluationFunction = &EvaluateKXK;
|
mi->evaluationFunction = &EvaluateKXK;
|
||||||
return mi;
|
return mi;
|
||||||
}
|
}
|
||||||
else if ( pos.non_pawn_material(WHITE) == Value(0)
|
else if ( pos.non_pawn_material(WHITE) == Value(0)
|
||||||
&& pos.piece_count(WHITE, PAWN) == 0
|
&& pos.piece_count(WHITE, PAWN) == 0
|
||||||
&& pos.non_pawn_material(BLACK) >= RookValueEndgame)
|
&& pos.non_pawn_material(BLACK) >= RookValueMidgame)
|
||||||
{
|
{
|
||||||
mi->evaluationFunction = &EvaluateKKX;
|
mi->evaluationFunction = &EvaluateKKX;
|
||||||
return mi;
|
return mi;
|
||||||
|
|
Loading…
Add table
Reference in a new issue