]> git.sesse.net Git - stockfish/commitdiff
Implement "seldepth" UCI info
authorMarco Costalba <mcostalba@gmail.com>
Fri, 31 Dec 2010 12:19:05 +0000 (13:19 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 31 Dec 2010 13:27:24 +0000 (14:27 +0100)
This is the "selective search depth in plies" and we set
equal to PV line length.

Tested that works under FritzGUI.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/evaluate.cpp
src/evaluate.h
src/search.cpp

index 3fc6bd5c4c3dcadb961094651aadb03a82b331c6..2a80568d50ef77e520d6a7e2f4c053393a9152d2 100644 (file)
@@ -414,7 +414,7 @@ void quit_eval() {
 
 /// read_weights() reads evaluation weights from the corresponding UCI parameters
 
-void read_weights(Color us) {
+void read_evaluation_uci_options(Color us) {
 
   // King safety is asymmetrical. Our king danger level is weighted by
   // "Cowardice" UCI parameter, instead the opponent one by "Aggressiveness".
index 4a04e739d4cc3b6311c7f3d97be9684d97c0dca1..6651aca2cc3d7d724f8cdba210c5cfbcda314891 100644 (file)
@@ -29,6 +29,6 @@ class Position;
 extern Value evaluate(const Position& pos, Value& margin);
 extern void init_eval(int threads);
 extern void quit_eval();
-extern void read_weights(Color sideToMove);
+extern void read_evaluation_uci_options(Color sideToMove);
 
 #endif // !defined(EVALUATE_H_INCLUDED)
index bf37989623031b85e59c522916536eff5fe4957c..b39bd53d8b8e35ce76fae02d53d6a34f158e2e58 100644 (file)
@@ -451,7 +451,7 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[
   MultiPV                   = Options["MultiPV"].value<int>();
   UseLogFile                = Options["Use Search Log"].value<bool>();
 
-  read_weights(pos.side_to_move());
+  read_evaluation_uci_options(pos.side_to_move());
 
   // Set the number of active threads
   ThreadsMgr.read_uci_options();
@@ -2611,19 +2611,21 @@ split_point_start: // At split points actual search starts from here
 
   std::string RootMove::pv_info_to_uci(const Position& pos, Value alpha, Value beta, int pvLine) {
 
-    std::stringstream s;
+    std::stringstream s, l;
+    Move* m = pv;
+
+    while (*m != MOVE_NONE)
+        l << *m++ << " ";
 
     s << "info depth " << Iteration // FIXME
+      << " seldepth " << int(m - pv)
       << " multipv " << pvLine + 1
       << " score " << value_to_uci(pv_score)
       << (pv_score >= beta ? " lowerbound" : pv_score <= alpha ? " upperbound" : "")
       << " time "  << current_search_time()
       << " nodes " << pos.nodes_searched()
       << " nps "   << nps(pos)
-      << " pv ";
-
-    for (Move* m = pv; *m != MOVE_NONE; m++)
-        s << *m << " ";
+      << " pv "    << l.str();
 
     if (UseLogFile && pvLine == 0)
     {