mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Display classic and NNUE evaluation in trace mode
show both the classical and NNUE evaluation, as well as the Final evaluation. closes https://github.com/official-stockfish/Stockfish/pull/3042 No functional change.
This commit is contained in:
parent
e64b957274
commit
cbcb05ca09
1 changed files with 35 additions and 30 deletions
|
@ -972,12 +972,6 @@ std::string Eval::trace(const Position& pos) {
|
|||
|
||||
Value v;
|
||||
|
||||
if (Eval::useNNUE)
|
||||
{
|
||||
v = NNUE::evaluate(pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::memset(scores, 0, sizeof(scores));
|
||||
|
||||
pos.this_thread()->contempt = SCORE_ZERO; // Reset any dynamic contempt
|
||||
|
@ -1003,11 +997,22 @@ std::string Eval::trace(const Position& pos) {
|
|||
<< " Winnable | " << Term(WINNABLE)
|
||||
<< " ------------+-------------+-------------+------------\n"
|
||||
<< " Total | " << Term(TOTAL);
|
||||
}
|
||||
|
||||
v = pos.side_to_move() == WHITE ? v : -v;
|
||||
|
||||
ss << "\nClassical evaluation: " << to_cp(v) << " (white side)\n";
|
||||
|
||||
if (Eval::useNNUE)
|
||||
{
|
||||
v = NNUE::evaluate(pos);
|
||||
v = pos.side_to_move() == WHITE ? v : -v;
|
||||
ss << "\nNNUE evaluation: " << to_cp(v) << " (white side)\n";
|
||||
}
|
||||
|
||||
v = evaluate(pos);
|
||||
v = pos.side_to_move() == WHITE ? v : -v;
|
||||
ss << "\nFinal evaluation: " << to_cp(v) << " (white side)\n";
|
||||
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue