X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=50dfcc0ced1dc210acb6bf8cb23ffe9c7e6458e7;hp=6e440702c9d69fc4ff26efa8fa982b2a565ecc1f;hb=72760c05c64d1fb2bb71c2ac54acfbeecf513b87;hpb=e0215f3222d4f6c09492633854a41aaa131c38e0 diff --git a/src/search.cpp b/src/search.cpp index 6e440702..50dfcc0c 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -903,8 +903,9 @@ namespace { } // Step 9. ProbCut (is omitted in PV nodes) - // If we have a good capture that raises the score well above beta and a reduced - // search confirms the score then we can (almost) safely prune the previous move. + // If we have a very good capture (i.e. SEE > seeValues[captured_piece_type]) + // and a reduced search returns a value much above beta, we can (almost) safely + // prune the previous move. if ( !PvNode && depth >= RazorDepth + ONE_PLY && !inCheck @@ -917,7 +918,7 @@ namespace { assert(rdepth >= ONE_PLY); - MovePicker mp(pos, ttMove, H, Max(rbeta - refinedValue, VALUE_ZERO)); + MovePicker mp(pos, ttMove, H, Position::see_value(pos.captured_piece_type())); pinned = pos.pinned_pieces(pos.side_to_move()); while ((move = mp.get_next_move()) != MOVE_NONE) @@ -1133,7 +1134,7 @@ split_point_start: // At split points actual search starts from here bool doFullDepthSearch = true; alpha = SpNode ? sp->alpha : alpha; - if ( depth >= 3 * ONE_PLY + if ( depth > 3 * ONE_PLY && !captureOrPromotion && !dangerous && !move_is_castle(move) @@ -1371,8 +1372,6 @@ split_point_start: // At split points actual search starts from here else ss->eval = bestValue = evaluate(pos, evalMargin); - update_gains(pos, (ss-1)->currentMove, (ss-1)->eval, ss->eval); - // Stand pat. Return immediately if static value is at least beta if (bestValue >= beta) { @@ -1394,7 +1393,7 @@ split_point_start: // At split points actual search starts from here // to search the moves. Because the depth is <= 0 here, only captures, // queen promotions and checks (only if depth >= DEPTH_QS_CHECKS) will // be generated. - MovePicker mp(pos, ttMove, depth, H); + MovePicker mp(pos, ttMove, depth, H, move_to((ss-1)->currentMove)); CheckInfo ci(pos); Bitboard pinned = pos.pinned_pieces(pos.side_to_move());