X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=45e0888d5efbfb58493075fb0b1c6699615046f6;hp=aaa2f515d7387ce0d7f21dfc28fbd250a029209d;hb=dc4e2d8184f916e245a887a188fa0ccc6831c3d1;hpb=dae4e7df07061c01c60bee182cf7e54f4743beb8 diff --git a/src/search.cpp b/src/search.cpp index aaa2f515..45e0888d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -169,6 +169,7 @@ namespace { Value(0x2A0), Value(0x340), Value(0x3A0) }; // Razoring + const bool RazorAtDepthOne = false; Depth RazorDepth = 4*OnePly; Value RazorMargin = Value(0x300); @@ -416,7 +417,7 @@ void think(const Position &pos, bool infinite, bool ponder, int side_to_move, UseFutilityPruning = get_option_value_bool("Futility Pruning (Main Search)"); FutilityMarginQS = value_from_centipawns(get_option_value_int("Futility Margin (Quiescence Search)")); - int fmScale = get_option_value_int("Futility Margin (Main Serach)"); + int fmScale = get_option_value_int("Futility Margin Scale Factor (Main Search)"); for (int i = 0; i < 6; i++) FutilityMargins[i] = (FutilityMargins[i] * fmScale) / 100; @@ -448,7 +449,6 @@ void think(const Position &pos, bool infinite, bool ponder, int side_to_move, // Set thinking time: int myTime = time[side_to_move]; int myIncrement = increment[side_to_move]; - int oppTime = time[1 - side_to_move]; if (!movesToGo) // Sudden death time control { @@ -1241,12 +1241,14 @@ namespace { else if ( !value_is_mate(beta) && approximateEval < beta - RazorMargin && depth < RazorDepth - && depth > 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 / 2 - int(depth - OnePly) * RazorMargin / 8) + if ( (v < beta - RazorMargin - RazorMargin / 4) + || (depth < 3*OnePly && v < beta - RazorMargin) + || (depth < 2*OnePly && v < beta - RazorMargin / 2)) return v; } @@ -2193,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)