]> git.sesse.net Git - stockfish/commitdiff
Fix a comment and add an assert in root_search()
authorMarco Costalba <mcostalba@gmail.com>
Sat, 6 Mar 2010 16:51:56 +0000 (17:51 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 6 Mar 2010 16:51:56 +0000 (17:51 +0100)
No functional change.

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

index 45c040f7fba80676459123d71012eee0032b6f17..cef7fda3e813c4f02fbbcae0ea857e298186e6c5 100644 (file)
@@ -950,6 +950,7 @@ namespace {
             rml.set_move_nodes(i, TM.nodes_searched() - nodes);
 
             assert(value >= -VALUE_INFINITE && value <= VALUE_INFINITE);
             rml.set_move_nodes(i, TM.nodes_searched() - nodes);
 
             assert(value >= -VALUE_INFINITE && value <= VALUE_INFINITE);
+            assert(value < beta);
 
             // Step 17. Check for new best move
             if (value <= alpha && i >= MultiPV)
 
             // Step 17. Check for new best move
             if (value <= alpha && i >= MultiPV)
@@ -975,8 +976,7 @@ namespace {
                     // Print information to the standard output
                     print_pv_info(pos, ss, alpha, beta, value);
 
                     // Print information to the standard output
                     print_pv_info(pos, ss, alpha, beta, value);
 
-                    // Raise alpha to setup proper non-pv search upper bound, note
-                    // that we can end up with alpha >= beta and so get a fail high.
+                    // Raise alpha to setup proper non-pv search upper bound
                     if (value > alpha)
                         alpha = value;
                 }
                     if (value > alpha)
                         alpha = value;
                 }