From 0d8a4c7565390c9f7ccc99799a76a19fb50e6f7b Mon Sep 17 00:00:00 2001 From: Lucas Braesch Date: Sun, 6 Apr 2014 11:43:30 +0200 Subject: [PATCH] Rescale UCI scores to PawnValueEg This is more consistent with what other engines are doing. Often people thinks that SF's scores are overblown. In the end, it just boils down to the arbitrary way of rescaling them. No functional change. --- src/evaluate.cpp | 2 +- src/notation.cpp | 4 ++-- src/search.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 28fd8341..ca70f2d0 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -939,7 +939,7 @@ Value do_evaluate(const Position& pos) { // Tracing function definitions - double Tracing::to_cp(Value v) { return double(v) / PawnValueMg; } + double Tracing::to_cp(Value v) { return double(v) / PawnValueEg; } void Tracing::add_term(int idx, Score wScore, Score bScore) { diff --git a/src/notation.cpp b/src/notation.cpp index a2c5aa68..9893569c 100644 --- a/src/notation.cpp +++ b/src/notation.cpp @@ -43,7 +43,7 @@ string score_to_uci(Value v, Value alpha, Value beta) { stringstream ss; if (abs(v) < VALUE_MATE_IN_MAX_PLY) - ss << "cp " << v * 100 / int(PawnValueMg); + ss << "cp " << v * 100 / int(PawnValueEg); else ss << "mate " << (v > 0 ? VALUE_MATE - v + 1 : -VALUE_MATE - v) / 2; @@ -207,7 +207,7 @@ static string format(Value v) { ss << "-#" << (VALUE_MATE + v) / 2; else - ss << setprecision(2) << fixed << showpos << double(v) / PawnValueMg; + ss << setprecision(2) << fixed << showpos << double(v) / PawnValueEg; return ss.str(); } diff --git a/src/search.cpp b/src/search.cpp index bb09df98..2ae1c368 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -185,7 +185,7 @@ void Search::think() { RootColor = RootPos.side_to_move(); TimeMgr.init(Limits, RootPos.game_ply(), RootColor); - int cf = Options["Contempt Factor"] * PawnValueMg / 100; // From centipawns + int cf = Options["Contempt Factor"] * PawnValueEg / 100; // From centipawns DrawValue[ RootColor] = VALUE_DRAW - Value(cf); DrawValue[~RootColor] = VALUE_DRAW + Value(cf); -- 2.39.2