mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
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.
This commit is contained in:
parent
64d29a6330
commit
0d8a4c7565
3 changed files with 4 additions and 4 deletions
|
@ -939,7 +939,7 @@ Value do_evaluate(const Position& pos) {
|
||||||
|
|
||||||
// Tracing function definitions
|
// 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) {
|
void Tracing::add_term(int idx, Score wScore, Score bScore) {
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ string score_to_uci(Value v, Value alpha, Value beta) {
|
||||||
stringstream ss;
|
stringstream ss;
|
||||||
|
|
||||||
if (abs(v) < VALUE_MATE_IN_MAX_PLY)
|
if (abs(v) < VALUE_MATE_IN_MAX_PLY)
|
||||||
ss << "cp " << v * 100 / int(PawnValueMg);
|
ss << "cp " << v * 100 / int(PawnValueEg);
|
||||||
else
|
else
|
||||||
ss << "mate " << (v > 0 ? VALUE_MATE - v + 1 : -VALUE_MATE - v) / 2;
|
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;
|
ss << "-#" << (VALUE_MATE + v) / 2;
|
||||||
|
|
||||||
else
|
else
|
||||||
ss << setprecision(2) << fixed << showpos << double(v) / PawnValueMg;
|
ss << setprecision(2) << fixed << showpos << double(v) / PawnValueEg;
|
||||||
|
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@ void Search::think() {
|
||||||
RootColor = RootPos.side_to_move();
|
RootColor = RootPos.side_to_move();
|
||||||
TimeMgr.init(Limits, RootPos.game_ply(), RootColor);
|
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);
|
||||||
DrawValue[~RootColor] = VALUE_DRAW + Value(cf);
|
DrawValue[~RootColor] = VALUE_DRAW + Value(cf);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue