+ // print_pv_info() prints to standard output and eventually to log file information on
+ // the current PV line. It is called at each iteration or after a new pv is found.
+
+ void print_pv_info(const Position& pos, SearchStack ss[], Value alpha, Value beta, Value value) {
+
+ cout << "info depth " << Iteration
+ << " score " << value_to_string(value)
+ << ((value >= beta) ? " lowerbound" :
+ ((value <= alpha)? " upperbound" : ""))
+ << " time " << current_search_time()
+ << " nodes " << TM.nodes_searched()
+ << " nps " << nps()
+ << " pv ";
+
+ for (int j = 0; ss[0].pv[j] != MOVE_NONE && j < PLY_MAX; j++)
+ cout << ss[0].pv[j] << " ";
+
+ cout << endl;
+
+ if (UseLogFile)
+ {
+ ValueType type = (value >= beta ? VALUE_TYPE_LOWER
+ : (value <= alpha ? VALUE_TYPE_UPPER : VALUE_TYPE_EXACT));
+
+ LogFile << pretty_pv(pos, current_search_time(), Iteration,
+ TM.nodes_searched(), value, type, ss[0].pv) << endl;
+ }
+ }
+
+