diff --git a/AUTHORS b/AUTHORS index 029109ac..9c25509b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -45,6 +45,7 @@ Gian-Carlo Pascutto (gcp) Gontran Lemaire (gonlem) Goodkov Vasiliy Aleksandrovich (goodkov) Gregor Cramer +GuardianRM Günther Demetz (pb00067, pb00068) Guy Vreuls (gvreuls) Henri Wiechers diff --git a/src/material.cpp b/src/material.cpp index 64a5bff0..d98eb125 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -34,11 +34,11 @@ namespace { constexpr int QuadraticOurs[][PIECE_TYPE_NB] = { // OUR PIECES // pair pawn knight bishop rook queen - {1667 }, // Bishop pair + {1443 }, // Bishop pair { 40, 0 }, // Pawn - { 32, 255, -3 }, // Knight OUR PIECES + { 32, 255, -67 }, // Knight OUR PIECES { 0, 104, 4, 0 }, // Bishop - { -26, -2, 47, 105, -149 }, // Rook + { -26, -2, 47, 105, -221 }, // Rook {-189, 24, 117, 133, -134, -10 } // Queen }; @@ -53,6 +53,8 @@ namespace { { 97, 100, -42, 137, 268, 0 } // Queen }; + constexpr int PawnCount[] = { 0, 304, 144, -320, -560, -704, -672, -464, -320 }; + // Endgame evaluation and scaling functions are accessed directly and not through // the function maps because they correspond to more than one material hash key. Endgame EvaluateKXK[] = { Endgame(WHITE), Endgame(BLACK) }; @@ -89,7 +91,7 @@ namespace { constexpr Color Them = (Us == WHITE ? BLACK : WHITE); - int bonus = 0; + int bonus = PawnCount[pieceCount[Us][PAWN]]; // Second-degree polynomial material imbalance, by Tord Romstad for (int pt1 = NO_PIECE_TYPE; pt1 <= QUEEN; ++pt1) diff --git a/src/search.cpp b/src/search.cpp index 0f27564a..b34d4ae7 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -258,7 +258,7 @@ void MainThread::search() { // Vote according to score and depth for (Thread* th : Threads) - votes[th->rootMoves[0].pv[0]] += int(th->rootMoves[0].score - minScore) + votes[th->rootMoves[0].pv[0]] += int(th->rootMoves[0].score - minScore) + int(th->completedDepth); // Select best thread diff --git a/src/types.h b/src/types.h index 43e9fbff..fdf7ba93 100644 --- a/src/types.h +++ b/src/types.h @@ -183,10 +183,10 @@ enum Value : int { VALUE_MATED_IN_MAX_PLY = -VALUE_MATE + 2 * MAX_PLY, PawnValueMg = 175, PawnValueEg = 240, - KnightValueMg = 764, KnightValueEg = 848, - BishopValueMg = 815, BishopValueEg = 905, - RookValueMg = 1282, RookValueEg = 1373, - QueenValueMg = 2500, QueenValueEg = 2670, + KnightValueMg = 784, KnightValueEg = 868, + BishopValueMg = 831, BishopValueEg = 919, + RookValueMg = 1286, RookValueEg = 1378, + QueenValueMg = 2527, QueenValueEg = 2697, MidgameLimit = 15258, EndgameLimit = 3915 };