From: VoyagerOne Date: Sat, 3 Mar 2018 11:03:38 +0000 (+0100) Subject: Do move-count pruning in probcut X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=b87308692a434d6725da72bbbb38a38d3cac1d5f Do move-count pruning in probcut STC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 4928 W: 1163 L: 1007 D: 2758 LTC: LLR: 2.95 (-2.94,2.94) [0.00,5.00] Total: 20368 W: 3441 L: 3238 D: 13689 http://tests.stockfishchess.org/tests/view/5a98bea40ebc590297cc8e5d Bench: 6361568 --- diff --git a/src/search.cpp b/src/search.cpp index f6cf8de8..8a50c3b1 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -757,10 +757,13 @@ namespace { Value rbeta = std::min(beta + 200, VALUE_INFINITE); MovePicker mp(pos, ttMove, rbeta - ss->staticEval, &thisThread->captureHistory); - - while ((move = mp.next_move()) != MOVE_NONE) + int probCutCount = 0; + while ( (move = mp.next_move()) != MOVE_NONE + && probCutCount < depth / ONE_PLY - 3) if (pos.legal(move)) { + probCutCount++; + ss->currentMove = move; ss->contHistory = thisThread->contHistory[pos.moved_piece(move)][to_sq(move)].get();