From: Fabian Fichter Date: Sat, 17 Jul 2021 20:18:28 +0000 (+0200) Subject: Merge official-stockfish/master X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d637857b991b3bb226fe87afd878e28ca8f1e477;p=fairystockfish.git Merge official-stockfish/master bench: 4456706 --- d637857b991b3bb226fe87afd878e28ca8f1e477 diff --cc src/search.cpp index afc5fb1,143d088..e258648 --- a/src/search.cpp +++ b/src/search.cpp @@@ -76,11 -74,11 +76,11 @@@ namespace Depth reduction(bool i, Depth d, int mn) { int r = Reductions[d] * Reductions[mn]; - return (r + 503) / 1024 + (!i && r > 915); + return (r + 534) / 1024 + (!i && r > 904); } - constexpr int futility_move_count(bool improving, Depth depth) { - return (3 + depth * depth) / (2 - improving); + int futility_move_count(bool improving, Depth depth, const Position& pos) { + return (3 + depth * depth + 2 * pos.blast_on_capture()) / (2 - improving + pos.blast_on_capture()); } // History and stats update bonus, based on depth @@@ -934,20 -798,18 +934,20 @@@ namespace // Step 8. Null move search with verification search (~40 Elo) if ( !PvNode && (ss-1)->currentMove != MOVE_NULL - && (ss-1)->statScore < 24185 + && (ss-1)->statScore < 23767 && eval >= beta && eval >= ss->staticEval - && ss->staticEval >= beta - 22 * depth - 34 * improving + 162 * ss->ttPv + 159 + 200 * (!pos.double_step_enabled() && pos.piece_to_char()[PAWN] != ' ') - && ss->staticEval >= beta - 20 * depth - 22 * improving + 168 * ss->ttPv + 159 ++ && ss->staticEval >= beta - 20 * depth - 22 * improving + 168 * ss->ttPv + 159 + 200 * (!pos.double_step_enabled() && pos.piece_to_char()[PAWN] != ' ') && !excludedMove && pos.non_pawn_material(us) + && pos.count(~us) != pos.count(~us) + && !pos.flip_enclosed_pieces() && (ss->ply >= thisThread->nmpMinPly || us != thisThread->nmpColor)) { assert(eval - beta >= 0); // Null move dynamic reduction based on depth and value - Depth R = (1062 - 300 * pos.must_capture() - 250 * !pos.checking_permitted() + 68 * depth) / 256 + std::min(int(eval - beta) / 190, pos.must_capture() || pos.blast_on_capture() ? 0 : 3); - Depth R = (1090 + 81 * depth) / 256 + std::min(int(eval - beta) / 205, 3); ++ Depth R = (1090 - 300 * pos.must_capture() - 250 * !pos.checking_permitted() + 81 * depth) / 256 + std::min(int(eval - beta) / 205, pos.must_capture() || pos.blast_on_capture() ? 0 : 3); ss->currentMove = MOVE_NULL; ss->continuationHistory = &thisThread->continuationHistory[0][0][NO_PIECE][0]; @@@ -1314,14 -1162,14 +1310,14 @@@ moves_loop: // When in check, search st r += 2; ss->statScore = thisThread->mainHistory[us][from_to(move)] - + (*contHist[0])[movedPiece][to_sq(move)] - + (*contHist[1])[movedPiece][to_sq(move)] - + (*contHist[3])[movedPiece][to_sq(move)] + + (*contHist[0])[history_slot(movedPiece)][to_sq(move)] + + (*contHist[1])[history_slot(movedPiece)][to_sq(move)] + + (*contHist[3])[history_slot(movedPiece)][to_sq(move)] - - 4791; + - 4923; // Decrease/increase reduction for moves with a good/bad history (~30 Elo) if (!ss->inCheck) - r -= ss->statScore / (14790 - 4434 * pos.captures_to_hand()); - r -= ss->statScore / 14721; ++ r -= ss->statScore / (14721 - 4434 * pos.captures_to_hand()); } // In general we want to cap the LMR depth search at newDepth. But if