]> git.sesse.net Git - stockfish/commitdiff
Print RootMoveList startup scoring
authorMarco Costalba <mcostalba@gmail.com>
Tue, 29 Sep 2009 09:14:09 +0000 (10:14 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 29 Sep 2009 09:14:43 +0000 (10:14 +0100)
This satisfies a specific user request of 28/8/2009

"The only issue I have is that during multiPV analysis, the depth 1
best move score is not reported by the engine (reporting for the best
move begins at depth 2).  I need it at depth 1 also. Would it be
possible to make this modification in future versions? This would be
of great help as otherwise I will have to use a lesser engine.

The goal of my project is to calculate the ELO performance in a game
and also the ELO rating of individual moves. For this I need depth 1
scores for lower rated performances. I intend to distribute the program
for free upon completion.

Thanks, Jack Welbourne"

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

index 24230ee7fd6b4ebe4b38369d9fd0ad3d4e5252e5..7d8f8e87e2e9b54f879399182ccccdb839396c88 100644 (file)
@@ -658,6 +658,15 @@ namespace {
     // searchMoves are verified, copied, scored and sorted
     RootMoveList rml(p, searchMoves);
 
+    // Print RootMoveList c'tor startup scoring to the standard output,
+    // so that we print information also for iteration 1.
+    std::cout << "info depth " << 1 << "\ninfo depth " << 1
+              << " score " << value_to_string(rml.get_move_score(0))
+              << " time " << current_search_time()
+              << " nodes " << nodes_searched()
+              << " nps " << nps()
+              << " pv " << rml.get_move(0) << "\n";
+
     // Initialize
     TT.new_search();
     H.clear();