X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=978f6622d3f142a178cf2c92a59ea07bdb9d76bd;hp=97ed340d4efd419ef1dbf3a70d2bc132a16d5ef0;hb=cf4c28ff86ac76c1d04701e2aa88493d31643db6;hpb=e6376d9b8daae0aa0dcda618ec6330bda2dcfaf7 diff --git a/src/search.cpp b/src/search.cpp index 97ed340d..978f6622 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -199,7 +199,7 @@ namespace { Depth PassedPawnExtension[2], PawnEndgameExtension[2], MateThreatExtension[2]; // Minimum depth for use of singular extension - const Depth SingularExtensionDepth[2] = { 7 * OnePly /* non-PV */, 6 * OnePly /* PV */}; + const Depth SingularExtensionDepth[2] = { 8 * OnePly /* non-PV */, 6 * OnePly /* PV */}; // If the TT move is at least SingularExtensionMargin better then the // remaining ones we will extend it. @@ -970,7 +970,7 @@ namespace { Move movesSearched[256]; EvalInfo ei; StateInfo st; - const TTEntry *tte, *ttx; + const TTEntry *tte; Key posKey; Move ttMove, move, excludedMove, threatMove; Depth ext, newDepth; @@ -1168,7 +1168,7 @@ namespace { // Expensive mate threat detection (only for PV nodes) if (PvNode) - mateThreat = pos.has_mate_threat(opposite_color(pos.side_to_move())); + mateThreat = pos.has_mate_threat(); // Initialize a MovePicker object for the current position MovePicker mp = MovePicker(pos, ttMove, depth, H, ss, (PvNode ? -VALUE_INFINITE : beta)); @@ -1207,22 +1207,9 @@ namespace { && move == tte->move() && ext < OnePly) { - // Avoid to do an expensive singular extension search on nodes where - // such search have already been done in the past, so assume the last - // singular extension search result is still valid. - if ( !PvNode - && depth < SingularExtensionDepth[PvNode] + 5 * OnePly - && (ttx = TT.retrieve(pos.get_exclusion_key())) != NULL) - { - if (is_upper_bound(ttx->type())) - ext = OnePly; - - singularExtensionNode = false; - } - Value ttValue = value_from_tt(tte->value(), ply); - if (singularExtensionNode && abs(ttValue) < VALUE_KNOWN_WIN) + if (abs(ttValue) < VALUE_KNOWN_WIN) { Value b = ttValue - SingularExtensionMargin; ss->excludedMove = move;