X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=f7f62b2344e7c5d2837fd21698d3b222a274771a;hb=cc3c1dc25a60335bceb9f07ef93aad81b366a717;hp=2fe6a5c1f68322cf8a28790c64bda74831ca965e;hpb=0da1d6a84612c8443b3e3c9b3f74890635ce23e2;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 2fe6a5c1..f7f62b23 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1241,14 +1241,14 @@ namespace { else if ( !value_is_mate(beta) && approximateEval < beta - RazorMargin && depth < RazorDepth - && (RazorAtDepthOne || depth >= 2*OnePly) + && (RazorAtDepthOne || depth > OnePly) && ttMove == MOVE_NONE && !pos.has_pawn_on_7th(pos.side_to_move())) { Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID); if ( (v < beta - RazorMargin - RazorMargin / 4) - || (depth < 3*OnePly && v < beta - RazorMargin) - || (depth < 2*OnePly && v < beta - RazorMargin / 2)) + || (depth <= 2*OnePly && v < beta - RazorMargin) + || (depth <= OnePly && v < beta - RazorMargin / 2)) return v; } @@ -2195,15 +2195,18 @@ namespace { if (mateThreat) result += MateThreatExtension[pvNode]; - if (pos.move_is_pawn_push_to_7th(m)) + if (pos.type_of_piece_on(move_from(m)) == PAWN) { - result += PawnPushTo7thExtension[pvNode]; - *dangerous = true; - } - if (pos.move_is_passed_pawn_push(m)) - { - result += PassedPawnExtension[pvNode]; - *dangerous = true; + if (pos.move_is_pawn_push_to_7th(m)) + { + result += PawnPushTo7thExtension[pvNode]; + *dangerous = true; + } + if (pos.move_is_passed_pawn_push(m)) + { + result += PassedPawnExtension[pvNode]; + *dangerous = true; + } } if ( pos.move_is_capture(m)