]> git.sesse.net Git - stockfish/commitdiff
Rescale UCI scores to PawnValueEg
authorLucas Braesch <lucas.braesch@gmail.com>
Sun, 6 Apr 2014 09:43:30 +0000 (11:43 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 6 Apr 2014 09:53:28 +0000 (11:53 +0200)
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
src/notation.cpp
src/search.cpp

index 28fd8341e8d8cfad2aba6ac7c694d1eee525b002..ca70f2d0a684529ab3b4b9c3bea9642f0f3883c4 100644 (file)
@@ -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) {
 
index a2c5aa68206ff5a2071a14f4092c58d33a823f86..9893569c742378cd62a1c4bbc9d63bf86c4ea005 100644 (file)
@@ -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();
 }
index bb09df984b7d301b9c3c93d6faa9f9eded4a68ec..2ae1c368c4e76b62c17f8e275b27ed32a5f5f1d8 100644 (file)
@@ -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);