X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.cpp;h=0f1e19b9ee4a954f69bb84844e9227110f21709a;hp=22953cff6d8d4328706cb1ffe4299d46214d2c05;hb=04fd7efdfa69c7eff716192238989b6dcdcead00;hpb=4ede49cd850392f28bc9da9537c111d2c3f0b297 diff --git a/src/material.cpp b/src/material.cpp index 22953cff..0f1e19b9 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -240,7 +240,8 @@ Entry* probe(const Position& pos, Table& entries, Endgames& endgames) { } } - // No pawns makes it difficult to win, even with a material advantage + // No pawns makes it difficult to win, even with a material advantage. This + // catches some trivial draws like KK, KBK and KNK if (!pos.count(WHITE) && npm_w - npm_b <= BishopValueMg) { e->factor[WHITE] = (uint8_t) @@ -259,7 +260,7 @@ Entry* probe(const Position& pos, Table& entries, Endgames& endgames) { int minorPieceCount = pos.count(WHITE) + pos.count(WHITE) + pos.count(BLACK) + pos.count(BLACK); - e->spaceWeight = minorPieceCount * minorPieceCount; + e->spaceWeight = make_score(minorPieceCount * minorPieceCount, 0); } // Evaluate the material imbalance. We use PIECE_TYPE_NONE as a place holder