X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=dbbfa022a8920f246f42ed417dca591edc621f50;hp=f0d2431487641dc765f5c56d1a7a029f7cf439ef;hb=54382f8b0765693c7aa5714c94d7d21dc41f1fc4;hpb=a1096e55cfccd9700602287a15ac4051746db953 diff --git a/src/search.cpp b/src/search.cpp index f0d24314..dbbfa022 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -894,7 +894,7 @@ namespace { // Decide search depth for this move bool moveIsCapture = pos.move_is_capture(move); bool dangerous; - ext = extension(pos, move, true, pos.move_is_capture(move), pos.move_is_check(move), false, false, &dangerous); + ext = extension(pos, move, true, moveIsCapture, pos.move_is_check(move), false, false, &dangerous); newDepth = (Iteration - 2) * OnePly + ext + InitialDepth; // Make the move, and search it @@ -918,8 +918,8 @@ namespace { } else { - if (newDepth >= 3*OnePly - && i + MultiPV >= LMRPVMoves + if ( newDepth >= 3*OnePly + && i >= MultiPV + LMRPVMoves - 2 // Remove -2 and decrease LMRPVMoves instead ? && !dangerous && !moveIsCapture && !move_is_promotion(move) @@ -927,10 +927,10 @@ namespace { { ss[0].reduction = OnePly; value = -search(pos, ss, -alpha, newDepth-OnePly, 1, true, 0); - } - else + } else value = alpha + 1; // Just to trigger next condition - if(value > alpha) + + if (value > alpha) { value = -search(pos, ss, -alpha, newDepth, 1, true, 0); if (value > alpha) @@ -975,6 +975,7 @@ namespace { // Update PV rml.set_move_score(i, value); update_pv(ss, 0); + TT.extract_pv(pos, ss[0].pv); rml.set_move_pv(i, ss[0].pv); if (MultiPV == 1) @@ -988,6 +989,8 @@ namespace { // Print search information to the standard output std::cout << "info depth " << Iteration << " score " << value_to_string(value) + << ((value >= beta)? + " lowerbound" : ((value <= alpha)? " upperbound" : "")) << " time " << current_search_time() << " nodes " << nodes_searched() << " nps " << nps() @@ -2430,7 +2433,7 @@ namespace { } - // slowdown() simply wastes CPU cycles doing nothing useful. It's used + // slowdown() simply wastes CPU cycles doing nothing useful. It's used // in strength handicap mode. void slowdown(const Position &pos) {