From: Tord Romstad Date: Tue, 6 Oct 2009 10:51:15 +0000 (+0200) Subject: Display fail high/fail low in search log file. X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=18cd83a38042a3993678e88bc8163ceb1cbd62b4 Display fail high/fail low in search log file. --- diff --git a/src/san.cpp b/src/san.cpp index 0aa8318e..0e9b5310 100644 --- a/src/san.cpp +++ b/src/san.cpp @@ -325,14 +325,15 @@ const string line_to_san(const Position& pos, Move line[], int startColumn, bool /// when the UCI parameter "Use Search Log" is "true"). const string pretty_pv(const Position& pos, int time, int depth, - uint64_t nodes, Value score, Move pv[]) { + uint64_t nodes, Value score, ValueType type, Move pv[]) { std::stringstream s; // Depth s << std::setw(2) << depth << " "; // Score - s << std::setw(8) << score_string(score); + s << ((type == VALUE_TYPE_LOWER)? ">" : ((type == VALUE_TYPE_UPPER)? "<" : " ")); + s << std::setw(7) << score_string(score); // Time s << std::setw(8) << time_string(time) << " "; diff --git a/src/san.h b/src/san.h index b4b5bffe..42202cfa 100644 --- a/src/san.h +++ b/src/san.h @@ -39,6 +39,6 @@ extern const std::string move_to_san(const Position& pos, Move m); extern Move move_from_san(const Position& pos, const std::string& str); extern const std::string line_to_san(const Position& pos, Move line[], int startColumn, bool breakLines); -extern const std::string pretty_pv(const Position& pos, int time, int depth, uint64_t nodes, Value score, Move pv[]); +extern const std::string pretty_pv(const Position& pos, int time, int depth, uint64_t nodes, Value score, ValueType type, Move pv[]); #endif // !defined(SAN_H_INCLUDED) diff --git a/src/search.cpp b/src/search.cpp index 17a1aeab..78b85485 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -971,7 +971,10 @@ namespace { std::cout << std::endl; if (UseLogFile) - LogFile << pretty_pv(pos, current_search_time(), Iteration, nodes_searched(), value, ss[0].pv) + LogFile << pretty_pv(pos, current_search_time(), Iteration, nodes_searched(), value, + ((value >= beta)? VALUE_TYPE_LOWER + : ((value <= alpha)? VALUE_TYPE_UPPER : VALUE_TYPE_EXACT)), + ss[0].pv) << std::endl; if (value > alpha)