X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.cpp;h=a3d9f7c8a73958ca7c8235e6f62c81ec85479d58;hp=8532e361e81a3429e30609762b7011c7dde3b7fc;hb=eddfd46a1016c544cc0f18600677fe121f3cbbff;hpb=20788783768ad5317eb1273bf0971f2e994635dd diff --git a/src/material.cpp b/src/material.cpp index 8532e361..a3d9f7c8 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -47,8 +47,8 @@ namespace { { 7, 25, 4, 7, 7, 7 }, { -27, -2, 46, 100, 56, 7 }, { 58, 29, 83, 148, -3, -25 } }; const int QuadraticCoefficientsOppositeColor[][6] = { - { 0, 0, 0, 0, 0, 0 }, { -4, 0, 0, 0, 0, 0 }, { -31, 21, 0, 0, 0, 0 }, - { 16, 23, -2, 0, 0, 0 }, { 9, -1, -18, -63, 0, 0 }, { 65, 60, -38, 110, 130, 0 } }; + { 41, 41, 41, 41, 41, 41 }, { 37, 41, 41, 41, 41, 41 }, { 10, 62, 41, 41, 41, 41 }, + { 57, 64, 39, 41, 41, 41 }, { 50, 40, 23, -22, 41, 41 }, { 106, 101, 3, 151, 171, 41 } }; // Named endgame evaluation and scaling functions, these // are accessed direcly and not through the function maps. @@ -171,14 +171,14 @@ MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) { mi->evaluationFunction = &EvaluateKKX; return mi; } - else if ( pos.pawns() == EmptyBoardBB - && pos.rooks() == EmptyBoardBB - && pos.queens() == EmptyBoardBB) + else if ( pos.pieces(PAWN) == EmptyBoardBB + && pos.pieces(ROOK) == EmptyBoardBB + && pos.pieces(QUEEN) == EmptyBoardBB) { // Minor piece endgame with at least one minor piece per side and // no pawns. Note that the case KmmK is already handled by KXK. - assert(pos.knights(WHITE) | pos.bishops(WHITE)); - assert(pos.knights(BLACK) | pos.bishops(BLACK)); + assert((pos.pieces(KNIGHT, WHITE) | pos.pieces(BISHOP, WHITE))); + assert((pos.pieces(KNIGHT, BLACK) | pos.pieces(BISHOP, BLACK))); if ( pos.piece_count(WHITE, BISHOP) + pos.piece_count(WHITE, KNIGHT) <= 2 && pos.piece_count(BLACK, BISHOP) + pos.piece_count(BLACK, KNIGHT) <= 2)