From e2719bc16136ab319da7973a14ab15588fec3288 Mon Sep 17 00:00:00 2001 From: PikaCat Date: Sat, 20 Jul 2024 16:20:12 +0800 Subject: [PATCH] search --- src/search.cpp | 126 +++++++++++++++++++++++++------------------------ 1 file changed, 64 insertions(+), 62 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 1fbd494e..7c4d0635 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -45,6 +45,8 @@ #include "ucioption.h" namespace Stockfish { +int search_55_0 = 174, search_55_1 = 28, search_70_0 = 13, search_75_0 = 226, search_75_1 = 101, search_75_2 = 1675, search_78_0 = 748, search_78_1 = 255, search_78_2 = 1435, search_264_0 = 12, search_264_1 = 30272, search_269_0 = 95, search_269_1 = 95, search_392_0 = 73, search_392_1 = 18, search_393_0 = 4, search_394_0 = 74298, search_395_0 = 46, search_395_1 = 160, search_398_0 = 10, search_398_1 = 185, search_398_2 = 64, search_399_0 = 194, search_399_1 = 243, search_400_0 = 103, search_400_1 = 183, search_401_0 = 1026, search_401_1 = 931, search_408_0 = 10, search_408_1 = 89, search_408_2 = 80, search_423_0 = 343, search_439_0 = 700, search_440_0 = 1328, search_450_0 = 2055, search_641_0 = 12, search_641_1 = 1003, search_641_2 = 1820, search_641_3 = 800, search_659_0 = 1095, search_659_1 = 337, search_668_0 = 9, search_670_0 = 183, search_677_0 = 12853, search_678_0 = 11, search_678_1 = 129, search_685_0 = 143, search_699_0 = 13, search_720_0 = 2, search_728_0 = 9, search_734_0 = 146, search_734_1 = 67, search_802_0 = 425, search_883_0 = 16, search_885_0 = 375, search_885_1 = 322, search_886_0 = 5, search_892_0 = 35, search_892_1 = 229, search_892_2 = 163, search_893_0 = 241, search_904_0 = 3653, search_909_0 = 4727, search_912_0 = 58, search_912_1 = 136, search_912_2 = 119, search_912_3 = 138, search_915_0 = 9, search_926_0 = 28, search_953_0 = 46, search_953_1 = 56, search_953_2 = 81, search_963_0 = 313, search_963_1 = 183, search_964_0 = 128, search_964_1 = 227, search_964_2 = 293, search_964_3 = 106, search_969_0 = 16, search_1002_0 = 4306, search_1058_0 = 5294, search_1061_0 = 9313, search_1064_0 = 10, search_1080_0 = 65, search_1204_0 = 10, search_1248_0 = 121, search_1248_1 = 5, search_1248_2 = 102, search_1248_3 = 121, search_1248_4 = 13, search_1249_0 = 61, search_1249_1 = 138, search_1250_0 = 143, search_1250_1 = 81, search_1253_0 = 100, search_1253_1 = 50, search_1253_2 = 250, search_1258_0 = 106, search_1260_0 = 188, search_1264_0 = 23, search_1433_0 = 143, search_1503_0 = 3733, search_1507_0 = 105, search_1573_0 = 2061, search_1573_1 = 1399, search_1573_2 = 1235, search_1573_3 = 773; +TUNE(search_55_0, search_55_1, search_70_0, search_75_0, search_75_1, search_75_2, search_78_0, search_78_1, search_78_2, search_264_0, search_264_1, search_269_0, search_269_1, search_392_0, search_392_1, search_393_0, search_394_0, search_395_0, search_395_1, search_398_0, search_398_1, search_398_2, search_399_0, search_399_1, search_400_0, search_400_1, search_401_0, search_401_1, search_408_0, search_408_1, search_408_2, search_423_0, search_439_0, search_440_0, search_450_0, search_641_0, search_641_1, search_641_2, search_641_3, search_659_0, search_659_1, search_668_0, search_670_0, search_677_0, search_678_0, search_678_1, search_685_0, search_699_0, search_720_0, search_728_0, search_734_0, search_734_1, search_802_0, search_883_0, search_885_0, search_885_1, search_886_0, search_892_0, search_892_1, search_892_2, search_893_0, search_904_0, search_909_0, search_912_0, search_912_1, search_912_2, search_912_3, search_915_0, search_926_0, search_953_0, search_953_1, search_953_2, search_963_0, search_963_1, search_964_0, search_964_1, search_964_2, search_964_3, search_969_0, search_1002_0, search_1058_0, search_1061_0, search_1064_0, search_1080_0, search_1204_0, search_1248_0, search_1248_1, search_1248_2, search_1248_3, search_1248_4, search_1249_0, search_1249_1, search_1250_0, search_1250_1, search_1253_0, search_1253_1, search_1253_2, search_1258_0, search_1260_0, search_1264_0, search_1433_0, search_1503_0, search_1507_0, search_1573_0, search_1573_1, search_1573_2, search_1573_3); using Eval::evaluate; using namespace Search; @@ -53,7 +55,7 @@ namespace { // Futility margin Value futility_margin(Depth d, bool noTtCutNode, bool improving, bool oppWorsening) { - Value futilityMult = 174 - 28 * noTtCutNode; + Value futilityMult = (search_55_0) - (search_55_1) * noTtCutNode; Value improvingDeduction = improving * futilityMult * 2; Value worseningDeduction = oppWorsening * futilityMult / 3; @@ -68,15 +70,15 @@ constexpr int futility_move_count(bool improving, Depth depth) { // does not hit the mate range. Value to_corrected_static_eval(Value v, const Worker& w, const Position& pos) { auto cv = w.correctionHistory[pos.side_to_move()][pawn_structure_index(pos)]; - v += cv / 13; + v += cv / (search_70_0); return std::clamp(v, VALUE_MATED_IN_MAX_PLY + 1, VALUE_MATE_IN_MAX_PLY - 1); } // History and stats update bonus, based on depth -int stat_bonus(Depth d) { return std::min(226 * d - 101, 1675); } +int stat_bonus(Depth d) { return std::min((search_75_0) * d - (search_75_1), (search_75_2)); } // History and stats update malus, based on depth -int stat_malus(Depth d) { return std::min(748 * d - 255, 1435); } +int stat_malus(Depth d) { return std::min((search_78_0) * d - (search_78_1), (search_78_2)); } // Add a small random component to draw evaluations to avoid 3-fold blindness Value value_draw(size_t nodes) { return VALUE_DRAW - 1 + Value(nodes & 0x2); } @@ -262,12 +264,12 @@ void Search::Worker::iterative_deepening() { // Reset aspiration window starting size Value avg = rootMoves[pvIdx].averageScore; - delta = 12 + avg * avg / 30272; + delta = (search_264_0) + avg * avg / (search_264_1); alpha = std::max(avg - delta, -VALUE_INFINITE); beta = std::min(avg + delta, VALUE_INFINITE); // Adjust optimism based on root move's averageScore (~4 Elo) - optimism[us] = 95 * avg / (std::abs(avg) + 95); + optimism[us] = (search_269_0) * avg / (std::abs(avg) + (search_269_1)); optimism[~us] = -optimism[us]; // Start with a small aspiration window and, in the case of a fail @@ -390,23 +392,23 @@ void Search::Worker::iterative_deepening() { { int nodesEffort = rootMoves[0].effort * 111 / std::max(size_t(1), size_t(nodes)); - double fallingEval = (73 + 18 * (mainThread->bestPreviousAverageScore - bestValue) - + 4 * (mainThread->iterValue[iterIdx] - bestValue)) - / 742.98; - fallingEval = std::clamp(fallingEval, 0.46, 1.60); + double fallingEval = ((search_392_0) + (search_392_1) * (mainThread->bestPreviousAverageScore - bestValue) + + (search_393_0) * (mainThread->iterValue[iterIdx] - bestValue)) + / (search_394_0 / 100.0); + fallingEval = std::clamp(fallingEval, (search_395_0 / 100.0), (search_395_1 / 100.0)); // If the bestMove is stable over several iterations, reduce time accordingly - timeReduction = lastBestMoveDepth + 10 < completedDepth ? 1.85 : 0.64; - double reduction = (1.94 + mainThread->previousTimeReduction) / (2.43 * timeReduction); - double bestMoveInstability = 1.03 + 1.83 * totBestMoveChanges / threads.size(); - double recapture = limits.capSq == rootMoves[0].pv[0].to_sq() ? 1.026 : 0.931; + timeReduction = lastBestMoveDepth + (search_398_0) < completedDepth ? (search_398_1 / 100.0) : (search_398_2 / 100.0); + double reduction = ((search_399_0 / 100.0) + mainThread->previousTimeReduction) / ((search_399_1 / 100.0) * timeReduction); + double bestMoveInstability = (search_400_0 / 100.0) + (search_400_1 / 100.0) * totBestMoveChanges / threads.size(); + double recapture = limits.capSq == rootMoves[0].pv[0].to_sq() ? (search_401_0 / 1000.0) : (search_401_1 / 1000.0); double totalTime = mainThread->tm.optimum() * fallingEval * reduction * bestMoveInstability * recapture; auto elapsedTime = elapsed(); - if (completedDepth >= 10 && nodesEffort >= 89 && elapsedTime > totalTime * 0.80 + if (completedDepth >= (search_408_0) && nodesEffort >= (search_408_1) && elapsedTime > totalTime * (search_408_2 / 100.0) && !mainThread->ponder) threads.stop = true; @@ -421,7 +423,7 @@ void Search::Worker::iterative_deepening() { threads.stop = true; } else - threads.increaseDepth = mainThread->ponder || elapsedTime <= totalTime * 0.343; + threads.increaseDepth = mainThread->ponder || elapsedTime <= totalTime * (search_423_0 / 1000.0); } mainThread->iterValue[iterIdx] = bestValue; @@ -437,8 +439,8 @@ void Search::Worker::iterative_deepening() { // Reset histories, usually before a new game void Search::Worker::clear() { mainHistory.fill(0); - captureHistory.fill(-700); - pawnHistory.fill(-1328); + captureHistory.fill(-(search_439_0)); + pawnHistory.fill(-(search_440_0)); correctionHistory.fill(0); for (bool inCheck : {false, true}) @@ -448,7 +450,7 @@ void Search::Worker::clear() { h->fill(-72); for (size_t i = 1; i < reductions.size(); ++i) - reductions[i] = int((20.55 + std::log(size_t(options["Threads"])) / 2) * std::log(i)); + reductions[i] = int(((search_450_0 / 100.0) + std::log(size_t(options["Threads"])) / 2) * std::log(i)); refreshTable.clear(network[numaAccessToken]); } @@ -639,7 +641,7 @@ Value Search::Worker::search( // Use static evaluation difference to improve quiet move ordering (~9 Elo) if (((ss - 1)->currentMove).is_ok() && !(ss - 1)->inCheck && !priorCapture) { - int bonus = std::clamp(-12 * int((ss - 1)->staticEval + ss->staticEval), -1003, 1820) + 800; + int bonus = std::clamp(-(search_641_0) * int((ss - 1)->staticEval + ss->staticEval), -(search_641_1), (search_641_2)) + (search_641_3); thisThread->mainHistory[~us][((ss - 1)->currentMove).from_to()] << bonus; if (type_of(pos.piece_on(prevSq)) != PAWN) thisThread->pawnHistory[pawn_structure_index(pos)][pos.piece_on(prevSq)][prevSq] @@ -657,7 +659,7 @@ Value Search::Worker::search( // Step 6. Razoring (~1 Elo) // If eval is really low, check with qsearch if we can exceed alpha. If the // search suggests we cannot exceed alpha, return a speculative fail low. - if (eval < alpha - 1095 - 337 * depth * depth) + if (eval < alpha - (search_659_0) - (search_659_1) * depth * depth) { value = qsearch(pos, ss, alpha - 1, alpha); if (value < alpha && std::abs(value) < VALUE_MATE_IN_MAX_PLY) @@ -666,24 +668,24 @@ Value Search::Worker::search( // Step 7. Futility pruning: child node (~40 Elo) // The depth condition is important for mate finding. - if (!ss->ttPv && depth < 9 + if (!ss->ttPv && depth < (search_668_0) && eval - futility_margin(depth, cutNode && !ss->ttHit, improving, opponentWorsening) - - (ss - 1)->statScore / 183 + - (ss - 1)->statScore / (search_670_0) >= beta && eval >= beta && (!ttData.move || ttCapture) && beta > VALUE_MATED_IN_MAX_PLY && eval < VALUE_MATE_IN_MAX_PLY) return beta + (eval - beta) / 3; // Step 8. Null move search with verification search (~35 Elo) - if (cutNode && (ss - 1)->currentMove != Move::null() && (ss - 1)->statScore < 12853 - && eval >= beta && ss->staticEval >= beta - 11 * depth + 129 && !excludedMove + if (cutNode && (ss - 1)->currentMove != Move::null() && (ss - 1)->statScore < (search_677_0) + && eval >= beta && ss->staticEval >= beta - (search_678_0) * depth + (search_678_1) && !excludedMove && pos.major_material(us) && ss->ply >= thisThread->nmpMinPly && beta > VALUE_MATED_IN_MAX_PLY) { assert(eval - beta >= 0); // Null move dynamic reduction based on depth and eval - Depth R = std::min(int(eval - beta) / 143, 5) + depth / 3 + 5; + Depth R = std::min(int(eval - beta) / (search_685_0), 5) + depth / 3 + 5; ss->currentMove = Move::null(); ss->continuationHistory = &thisThread->continuationHistory[0][0][NO_PIECE][0]; @@ -697,7 +699,7 @@ Value Search::Worker::search( // Do not return unproven mate if (nullValue >= beta && nullValue < VALUE_MATE_IN_MAX_PLY) { - if (thisThread->nmpMinPly || depth < 13) + if (thisThread->nmpMinPly || depth < (search_699_0)) return nullValue; assert(!thisThread->nmpMinPly); // Recursive verification is not allowed @@ -718,7 +720,7 @@ Value Search::Worker::search( // Step 9. Internal iterative reductions (~9 Elo) // For PV nodes without a ttMove, we decrease depth. if (PvNode && !ttData.move) - depth -= 2; + depth -= (search_720_0); // Use qsearch if depth <= 0 if (depth <= 0) @@ -726,13 +728,13 @@ Value Search::Worker::search( // For cutNodes, if depth is high enough, decrease depth by 2 if there is no ttMove, // or by 1 if there is a ttMove with an upper bound. - if (cutNode && depth >= 9 && (!ttData.move || ttData.bound == BOUND_UPPER)) + if (cutNode && depth >= (search_728_0) && (!ttData.move || ttData.bound == BOUND_UPPER)) depth -= 1 + !ttData.move; // Step 10. ProbCut (~10 Elo) // If we have a good enough capture and a reduced search returns a value // much above beta, we can (almost) safely prune the previous move. - probCutBeta = beta + 146 - 67 * improving; + probCutBeta = beta + (search_734_0) - (search_734_1) * improving; if (!PvNode && depth > 4 && std::abs(beta) < VALUE_MATE_IN_MAX_PLY // If value from transposition table is lower than probCutBeta, don't attempt @@ -800,7 +802,7 @@ Value Search::Worker::search( moves_loop: // When in check, search starts here // Step 11. A small Probcut idea (~4 Elo) - probCutBeta = beta + 425; + probCutBeta = beta + (search_802_0); if ((ttData.bound & BOUND_LOWER) && ttData.depth >= depth - 3 && ttData.value >= probCutBeta && std::abs(beta) < VALUE_MATE_IN_MAX_PLY && std::abs(probCutBeta) < VALUE_MATE_IN_MAX_PLY) return probCutBeta; @@ -881,17 +883,17 @@ Value Search::Worker::search( thisThread->captureHistory[movedPiece][move.to_sq()][type_of(capturedPiece)]; // Futility pruning for captures (~2 Elo) - if (!givesCheck && lmrDepth < 16 && !ss->inCheck) + if (!givesCheck && lmrDepth < (search_883_0) && !ss->inCheck) { - Value futilityValue = ss->staticEval + 375 + 322 * lmrDepth - + PieceValue[capturedPiece] + captHist / 5; + Value futilityValue = ss->staticEval + (search_885_0) + (search_885_1) * lmrDepth + + PieceValue[capturedPiece] + captHist / (search_886_0); if (futilityValue <= alpha) continue; } // SEE based pruning for captures and checks (~11 Elo) - int seeHist = std::clamp(captHist / 35, -229 * depth, 163 * depth); - if (!pos.see_ge(move, -241 * depth - seeHist)) + int seeHist = std::clamp(captHist / (search_892_0), -(search_892_1) * depth, (search_892_2) * depth); + if (!pos.see_ge(move, -(search_893_0) * depth - seeHist)) continue; } else @@ -902,18 +904,18 @@ Value Search::Worker::search( + thisThread->pawnHistory[pawn_structure_index(pos)][movedPiece][move.to_sq()]; // Continuation history based pruning (~2 Elo) - if (history < -3653 * depth) + if (history < -(search_904_0) * depth) continue; history += 2 * thisThread->mainHistory[us][move.from_to()]; - lmrDepth += history / 4727; + lmrDepth += history / (search_909_0); Value futilityValue = - ss->staticEval + (bestValue < ss->staticEval - 58 ? 136 : 119) + 138 * lmrDepth; + ss->staticEval + (bestValue < ss->staticEval - (search_912_0) ? (search_912_1) : (search_912_2)) + (search_912_3) * lmrDepth; // Futility pruning: parent node (~13 Elo) - if (!ss->inCheck && lmrDepth < 9 && futilityValue <= alpha) + if (!ss->inCheck && lmrDepth < (search_915_0) && futilityValue <= alpha) { if (bestValue <= futilityValue && std::abs(bestValue) < VALUE_MATE_IN_MAX_PLY && futilityValue < VALUE_MATE_IN_MAX_PLY) @@ -924,7 +926,7 @@ Value Search::Worker::search( lmrDepth = std::max(lmrDepth, 0); // Prune moves with negative SEE (~4 Elo) - if (!pos.see_ge(move, -28 * lmrDepth * lmrDepth)) + if (!pos.see_ge(move, -(search_926_0) * lmrDepth * lmrDepth)) continue; } } @@ -951,7 +953,7 @@ Value Search::Worker::search( && std::abs(ttData.value) < VALUE_MATE_IN_MAX_PLY && (ttData.bound & BOUND_LOWER) && ttData.depth >= depth - 3) { - Value singularBeta = ttData.value - (46 + 56 * (ss->ttPv && !PvNode)) * depth / 81; + Value singularBeta = ttData.value - ((search_953_0) + (search_953_1) * (ss->ttPv && !PvNode)) * depth / (search_953_2); Depth singularDepth = newDepth / 2; ss->excludedMove = move; @@ -961,13 +963,13 @@ Value Search::Worker::search( if (value < singularBeta) { - int doubleMargin = 313 * PvNode - 183 * !ttCapture; - int tripleMargin = 128 + 227 * PvNode - 293 * !ttCapture + 106 * ss->ttPv; + int doubleMargin = (search_963_0) * PvNode - (search_963_1) * !ttCapture; + int tripleMargin = (search_964_0) + (search_964_1) * PvNode - (search_964_2) * !ttCapture + (search_964_3) * ss->ttPv; extension = 1 + (value < singularBeta - doubleMargin) + (value < singularBeta - tripleMargin); - depth += ((!PvNode) && (depth < 16)); + depth += ((!PvNode) && (depth < (search_969_0))); } // Multi-cut pruning @@ -1000,7 +1002,7 @@ Value Search::Worker::search( else if (PvNode && move.to_sq() == prevSq && thisThread->captureHistory[movedPiece][move.to_sq()] [type_of(pos.piece_on(move.to_sq()))] - > 4306) + > (search_1002_0)) extension = 1; } @@ -1056,13 +1058,13 @@ Value Search::Worker::search( ss->statScore = 2 * thisThread->mainHistory[us][move.from_to()] + (*contHist[0])[movedPiece][move.to_sq()] - + (*contHist[1])[movedPiece][move.to_sq()] - 5294; + + (*contHist[1])[movedPiece][move.to_sq()] - (search_1058_0); // Decrease/increase reduction for moves with a good/bad history (~8 Elo) - r -= ss->statScore / 9313; + r -= ss->statScore / (search_1061_0); // Step 16. Late moves reduction / extension (LMR, ~117 Elo) - if (depth >= 2 && moveCount > 1 + (rootNode && depth < 10)) + if (depth >= 2 && moveCount > 1 + (rootNode && depth < (search_1064_0))) { // In general we want to cap the LMR depth search at newDepth, but when // reduction is negative, we allow this move a limited search extension @@ -1078,7 +1080,7 @@ Value Search::Worker::search( { // Adjust full-depth search based on LMR results - if the result was // good enough search deeper, if it was bad enough search shallower. - const bool doDeeperSearch = value > (bestValue + 65 + 2 * newDepth); // (~1 Elo) + const bool doDeeperSearch = value > (bestValue + (search_1080_0) + 2 * newDepth); // (~1 Elo) const bool doShallowerSearch = value < bestValue + newDepth; // (~2 Elo) newDepth += doDeeperSearch - doShallowerSearch; @@ -1202,7 +1204,7 @@ Value Search::Worker::search( else { // Reduce other moves if we have found at least one score improvement (~2 Elo) - if (depth > 2 && depth < 10 && std::abs(value) < VALUE_MATE_IN_MAX_PLY) + if (depth > 2 && depth < (search_1204_0) && std::abs(value) < VALUE_MATE_IN_MAX_PLY) depth -= 2; assert(depth > 0); @@ -1246,23 +1248,23 @@ Value Search::Worker::search( else if (!priorCapture && prevSq != SQ_NONE) { int bonus = - (121 * (depth > 5) + 102 * (PvNode || cutNode) + 121 * ((ss - 1)->moveCount > 13) - + 61 * (!ss->inCheck && bestValue <= ss->staticEval - 138) - + 143 * (!(ss - 1)->inCheck && bestValue <= -(ss - 1)->staticEval - 81)); + ((search_1248_0) * (depth > (search_1248_1)) + (search_1248_2) * (PvNode || cutNode) + (search_1248_3) * ((ss - 1)->moveCount > (search_1248_4)) + + (search_1249_0) * (!ss->inCheck && bestValue <= ss->staticEval - (search_1249_1)) + + (search_1250_0) * (!(ss - 1)->inCheck && bestValue <= -(ss - 1)->staticEval - (search_1250_1))); // proportional to "how much damage we have to undo" - bonus += std::clamp(-(ss - 1)->statScore / 100, -50, 250); + bonus += std::clamp(-(ss - 1)->statScore / (search_1253_0), -(search_1253_1), (search_1253_2)); bonus = std::max(bonus, 0); update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq, - stat_bonus(depth) * bonus / 106); + stat_bonus(depth) * bonus / (search_1258_0)); thisThread->mainHistory[~us][((ss - 1)->currentMove).from_to()] - << stat_bonus(depth) * bonus / 188; + << stat_bonus(depth) * bonus / (search_1260_0); if (type_of(pos.piece_on(prevSq)) != PAWN) thisThread->pawnHistory[pawn_structure_index(pos)][pos.piece_on(prevSq)][prevSq] - << stat_bonus(depth) * bonus / 23; + << stat_bonus(depth) * bonus / (search_1264_0); } if (PvNode) @@ -1431,7 +1433,7 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta, if (bestValue > alpha) alpha = bestValue; - futilityBase = ss->staticEval + 143; + futilityBase = ss->staticEval + (search_1433_0); } const PieceToHistory* contHist[] = {(ss - 1)->continuationHistory, @@ -1501,11 +1503,11 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta, + (*contHist[1])[pos.moved_piece(move)][move.to_sq()] + thisThread->pawnHistory[pawn_structure_index(pos)][pos.moved_piece(move)] [move.to_sq()] - <= 3733) + <= (search_1503_0)) continue; // Do not search moves with bad enough SEE values (~5 Elo) - if (!pos.see_ge(move, -105)) + if (!pos.see_ge(move, -(search_1507_0))) continue; } @@ -1571,7 +1573,7 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta, Depth Search::Worker::reduction(bool i, Depth d, int mn, int delta) const { int reductionScale = reductions[d] * reductions[mn]; - return (reductionScale + 2061 - delta * 1399 / rootDelta) / 1235 + (!i && reductionScale > 773); + return (reductionScale + (search_1573_0) - delta * (search_1573_1) / rootDelta) / (search_1573_2) + (!i && reductionScale > (search_1573_3)); } // elapsed() returns the time elapsed since the search started. If the