diff --git a/src/search.cpp b/src/search.cpp index 6d78403ffd9..cd7369c8623 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -63,7 +63,7 @@ namespace { // Futility margin Value futility_margin(Depth d, bool improving) { - return Value(168 * (d - improving)); + return Value(174 * (d - improving)); } // Reductions lookup table, initialized at startup @@ -362,7 +362,7 @@ void Thread::search() { trend = (us == WHITE ? make_score(tr, tr / 2) : -make_score(tr, tr / 2)); - int opt = sigmoid(prev, 8, 17, 144, 13966, 183); + int opt = sigmoid(prev, 8, 17, 144, 15012, 183); optimism[ us] = Value(opt); optimism[~us] = -optimism[us]; } @@ -778,7 +778,7 @@ namespace { // return a fail low. if ( !PvNode && depth <= 7 - && eval < alpha - 348 - 258 * depth * depth) + && eval < alpha - 341 - 267 * depth * depth) { value = qsearch(pos, ss, alpha - 1, alpha); if (value < alpha) @@ -797,7 +797,7 @@ namespace { // Step 9. Null move search with verification search (~22 Elo) if ( !PvNode && (ss-1)->currentMove != MOVE_NULL - && (ss-1)->statScore < 14695 + && (ss-1)->statScore < 15344 && eval >= beta && eval >= ss->staticEval && ss->staticEval >= beta - 15 * depth - improvement / 15 + 201 + complexity / 24 @@ -808,7 +808,7 @@ namespace { assert(eval - beta >= 0); // Null move dynamic reduction based on depth, eval and complexity of position - Depth R = std::min(int(eval - beta) / 147, 5) + depth / 3 + 4 - (complexity > 650); + Depth R = std::min(int(eval - beta) / 152, 5) + depth / 3 + 4 - (complexity > 650); ss->currentMove = MOVE_NULL; ss->continuationHistory = &thisThread->continuationHistory[0][0][NO_PIECE][0]; @@ -844,7 +844,7 @@ namespace { } } - probCutBeta = beta + 179 - 46 * improving; + probCutBeta = beta + 173 - 46 * improving; // Step 10. ProbCut (~4 Elo) // If we have a good enough capture and a reduced search returns a value @@ -906,9 +906,9 @@ namespace { return qsearch(pos, ss, alpha, beta); if ( cutNode - && depth >= 8 + && depth >= 9 && !ttMove) - depth--; + depth -= 2; moves_loop: // When in check, search starts here @@ -1009,7 +1009,7 @@ namespace { && !PvNode && lmrDepth < 6 && !ss->inCheck - && ss->staticEval + 281 + 179 * lmrDepth + PieceValue[EG][pos.piece_on(to_sq(move))] + && ss->staticEval + 277 + 187 * lmrDepth + PieceValue[EG][pos.piece_on(to_sq(move))] + captureHistory[movedPiece][to_sq(move)][type_of(pos.piece_on(to_sq(move)))] / 6 < alpha) continue; @@ -1173,7 +1173,7 @@ namespace { + (*contHist[0])[movedPiece][to_sq(move)] + (*contHist[1])[movedPiece][to_sq(move)] + (*contHist[3])[movedPiece][to_sq(move)] - - 4334; + - 4560; // Decrease/increase reduction for moves with a good/bad history (~30 Elo) r -= ss->statScore / 15914; @@ -1188,7 +1188,7 @@ namespace { // Do full depth search when reduced LMR search fails high if (value > alpha && d < newDepth) { - const bool doDeeperSearch = value > (alpha + 78 + 11 * (newDepth - d)); + const bool doDeeperSearch = value > (alpha + 73 + 12 * (newDepth - d)); value = -search(pos, ss+1, -(alpha+1), -alpha, newDepth + doDeeperSearch, !cutNode); int bonus = value > alpha ? stat_bonus(newDepth) @@ -1337,14 +1337,14 @@ namespace { quietsSearched, quietCount, capturesSearched, captureCount, depth); // Bonus for prior countermove that caused the fail low - else if ( (depth >= 4 || PvNode) + else if ( (depth >= 5 || PvNode) && !priorCapture) { //Assign extra bonus if current node is PvNode or cutNode //or fail low was really bad bool extraBonus = PvNode || cutNode - || bestValue < alpha - 70 * depth; + || bestValue < alpha - 66 * depth; update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + extraBonus)); }