mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Improve ttPv reduction
This patch allows a partial reduction decrease when a node is likely to fail low, and increases the reduction decrease when a node has failed high. Passed STC: https://tests.stockfishchess.org/tests/view/65a626e779aa8af82b9722bc LLR: 2.93 (-2.94,2.94) <0.00,2.00> Total: 157824 W: 40332 L: 39835 D: 77657 Ptnml(0-2): 543, 18617, 40098, 19108, 546 Passed LTC: https://tests.stockfishchess.org/tests/view/65a7290279aa8af82b97328a LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 57228 W: 14475 L: 14111 D: 28642 Ptnml(0-2): 34, 6278, 15633, 6628, 41 closes https://github.com/official-stockfish/Stockfish/pull/4994 Bench: 1364759
This commit is contained in:
parent
9a9702d668
commit
c8bc2ce4fa
1 changed files with 4 additions and 8 deletions
|
@ -944,11 +944,6 @@ moves_loop: // When in check, search starts here
|
|||
value = bestValue;
|
||||
moveCountPruning = singularQuietLMR = false;
|
||||
|
||||
// Indicate PvNodes that will probably fail low if the node was searched
|
||||
// at a depth equal to or greater than the current depth, and the result
|
||||
// of this search was a fail low.
|
||||
bool likelyFailLow = PvNode && ttMove && (tte->bound() & BOUND_UPPER) && tte->depth() >= depth;
|
||||
|
||||
// Step 13. Loop through all pseudo-legal moves until no moves remain
|
||||
// or a beta cutoff occurs.
|
||||
while ((move = mp.next_move(moveCountPruning)) != Move::none())
|
||||
|
@ -1153,9 +1148,10 @@ moves_loop: // When in check, search starts here
|
|||
thisThread->nodes.fetch_add(1, std::memory_order_relaxed);
|
||||
pos.do_move(move, st, givesCheck);
|
||||
|
||||
// Decrease reduction if position is or has been on the PV (~4 Elo)
|
||||
if (ss->ttPv && !likelyFailLow)
|
||||
r -= 1 + (cutNode && tte->depth() >= depth) + (ttValue > alpha);
|
||||
// Decrease reduction if position is or has been on the PV (~7 Elo)
|
||||
if (ss->ttPv)
|
||||
r -= !(tte->bound() == BOUND_UPPER && PvNode) + (cutNode && tte->depth() >= depth)
|
||||
+ (ttValue > alpha) + (ttValue > beta && tte->depth() >= depth);
|
||||
|
||||
// Decrease reduction if opponent's move count is high (~1 Elo)
|
||||
if ((ss - 1)->moveCount > 7)
|
||||
|
|
Loading…
Add table
Reference in a new issue