diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 8e49cfc6..a6552330 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -35,12 +35,6 @@ double to_cp(Value v) return double(v) / StoneValue; } -std::ostream &operator<<(std::ostream &os, Score s) -{ - os << std::setw(5) << "" << " " - << std::setw(5) << ""; - return os; -} } using namespace Trace; diff --git a/src/search.cpp b/src/search.cpp index 9e533320..2f257b20 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -347,21 +347,6 @@ void Thread::search() multiPV = std::min(multiPV, rootMoves.size()); //ttHitAverage = TtHitAverageWindow * TtHitAverageResolution / 2; - //int ct = int(Options["Contempt"]) * PawnValueEg / 100; // From centipawns - int ct = int(Options["Contempt"]) * StoneValue / 100; // From centipawns // TODO - - // In analysis mode, adjust contempt in accordance with user preference - if (Limits.infinite || Options["UCI_AnalyseMode"]) - ct = Options["Analysis Contempt"] == "Off" ? 0 - : Options["Analysis Contempt"] == "Both" ? ct - : Options["Analysis Contempt"] == "White" && us == BLACK ? -ct - : Options["Analysis Contempt"] == "Black" && us == WHITE ? -ct - : ct; - - // Evaluation score is from the white point of view - contempt = (us == WHITE ? make_score(ct, ct / 2) - : -make_score(ct, ct / 2)); - int searchAgainCounter = 0; // Iterative deepening loop until requested to stop or the target depth is reached @@ -401,12 +386,6 @@ void Thread::search() delta = Value(21); alpha = std::max(prev - delta, -VALUE_INFINITE); beta = std::min(prev + delta, VALUE_INFINITE); - - // Adjust contempt based on root move's previousScore (dynamic contempt) - int dct = ct + (102 - ct / 2) * prev / (abs(prev) + 157); - - contempt = (us == WHITE ? make_score(dct, dct / 2) - : -make_score(dct, dct / 2)); } // Start with a small aspiration window and, in the case of a fail diff --git a/src/thread.h b/src/thread.h index 7311448b..bf4ea4d4 100644 --- a/src/thread.h +++ b/src/thread.h @@ -71,7 +71,6 @@ public: LowPlyHistory lowPlyHistory; CapturePieceToHistory captureHistory; ContinuationHistory continuationHistory[2][2]; - Score contempt; }; diff --git a/src/types.h b/src/types.h index 8244eb0c..ed74bf0a 100644 --- a/src/types.h +++ b/src/types.h @@ -99,7 +99,6 @@ constexpr bool Is64Bit = true; constexpr bool Is64Bit = false; #endif -using Score = uint32_t; //using Bitboard = uint32_t; typedef uint32_t Bitboard; @@ -353,11 +352,6 @@ enum Score : int }; #endif -// TODO Begin -constexpr Score make_score(int mg, int eg) -{ - return Score((int)((unsigned int)eg << 16) + mg); -} #define ENABLE_BASE_OPERATORS_ON(T) \ constexpr T operator+(T d1, T d2) { return T(int(d1) + int(d2)); } \