mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 17:49:35 +00:00
Fix bug for 'eval' command in terminal
The 'eval' debugging command in Terminal did not initialize the Eval::Contempt variable, leading to random output during debugging sessions (normal search was unaffected by the bug). Example of session where the two 'eval' commands should give the same output, but did not: ./stockfish position startpos d eval go depth 20 d eval The bug is fixed by initializing Eval::Contempt to SCORE_ZERO in Eval::trace No functional change.
This commit is contained in:
parent
917fe69f84
commit
211ebc5c7a
1 changed files with 4 additions and 1 deletions
|
@ -923,7 +923,10 @@ std::string Eval::trace(const Position& pos) {
|
||||||
|
|
||||||
std::memset(scores, 0, sizeof(scores));
|
std::memset(scores, 0, sizeof(scores));
|
||||||
|
|
||||||
Value v = Evaluation<TRACE>(pos).value() + Eval::Tempo;
|
Eval::Contempt = SCORE_ZERO;
|
||||||
|
|
||||||
|
Value v = Eval::Tempo + Evaluation<TRACE>(pos).value();
|
||||||
|
|
||||||
v = pos.side_to_move() == WHITE ? v : -v; // White's point of view
|
v = pos.side_to_move() == WHITE ? v : -v; // White's point of view
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
|
Loading…
Add table
Reference in a new issue