X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=252b4299239e5e039e3bb90a4ba04ed0cef5b49d;hb=2f7723fd44d5184c205d31ac1ac5199359afb0d3;hp=b4e9b14c6c5073c540cb33fc5657c80991a96ba2;hpb=620cfbb6760911a9f2ce188cd7244d86a76953c2;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index b4e9b14c..252b4299 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1080,7 +1080,7 @@ namespace { { // Try to reduce non-pv search depth by one ply if move seems not problematic, // if the move fails high will be re-searched at full depth. - if ( depth >= 2*OnePly + if ( depth >= 3*OnePly && moveCount >= LMRPVMoves && !dangerous && !moveIsCapture @@ -1249,11 +1249,7 @@ namespace { pos.undo_null_move(); - if (value_is_mate(nullValue)) - { - /* Do not return unproven mates */ - } - else if (nullValue >= beta) + if (nullValue >= beta) { if (depth < 6 * OnePly) return beta; @@ -2202,16 +2198,19 @@ namespace { assert(m != MOVE_NONE); Depth result = Depth(0); - *dangerous = check || singleReply || mateThreat; + *dangerous = check | singleReply | mateThreat; - if (check) - result += CheckExtension[pvNode]; + if (*dangerous) + { + if (check) + result += CheckExtension[pvNode]; - if (singleReply) - result += SingleReplyExtension[pvNode]; + if (singleReply) + result += SingleReplyExtension[pvNode]; - if (mateThreat) - result += MateThreatExtension[pvNode]; + if (mateThreat) + result += MateThreatExtension[pvNode]; + } if (pos.type_of_piece_on(move_from(m)) == PAWN) {