]> git.sesse.net Git - stockfish/blobdiff - src/notation.cpp
Rescale UCI scores to PawnValueEg
[stockfish] / src / notation.cpp
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();
 }