mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 17:49:35 +00:00
Cleanup of likelyFailLow logic
This patch broadens and simplifies definition of PvNode that is likely to fail low. New definition can be described as following "If node was already researched at depth >= current depth and failed low there" which is more logical than the previous version and takes less space + allows to not recompute it every time during move loop. Passed simplification STC https://tests.stockfishchess.org/tests/view/609148bf95e7f1852abd2e82 LLR: 2.93 (-2.94,2.94) <-2.50,0.50> Total: 20128 W: 1865 L: 1751 D: 16512 Ptnml(0-2): 63, 1334, 7165, 1430, 72 Passed simplification LTC https://tests.stockfishchess.org/tests/view/6091691295e7f1852abd2e8b LLR: 2.94 (-2.94,2.94) <-2.50,0.50> Total: 95128 W: 3498 L: 3481 D: 88149 Ptnml(0-2): 41, 2956, 41549, 2981, 37 closes https://github.com/official-stockfish/Stockfish/pull/3455 Bench: 3933037
This commit is contained in:
parent
ca250e969c
commit
d777ea79ff
1 changed files with 7 additions and 8 deletions
|
@ -1006,6 +1006,13 @@ moves_loop: // When in check, search starts from here
|
||||||
value = bestValue;
|
value = bestValue;
|
||||||
singularQuietLMR = moveCountPruning = false;
|
singularQuietLMR = moveCountPruning = false;
|
||||||
|
|
||||||
|
// Indicate PvNodes that will probably fail low if the node was searched
|
||||||
|
// at a depth equal 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;
|
||||||
|
|
||||||
// Mark this node as being searched
|
// Mark this node as being searched
|
||||||
ThreadHolding th(thisThread, posKey, ss->ply);
|
ThreadHolding th(thisThread, posKey, ss->ply);
|
||||||
|
|
||||||
|
@ -1044,14 +1051,6 @@ moves_loop: // When in check, search starts from here
|
||||||
movedPiece = pos.moved_piece(move);
|
movedPiece = pos.moved_piece(move);
|
||||||
givesCheck = pos.gives_check(move);
|
givesCheck = pos.gives_check(move);
|
||||||
|
|
||||||
// Indicate PvNodes that will probably fail low if node was searched with non-PV search
|
|
||||||
// at depth equal or greater to current depth and result of this search was far below alpha
|
|
||||||
bool likelyFailLow = PvNode
|
|
||||||
&& ttMove
|
|
||||||
&& (tte->bound() & BOUND_UPPER)
|
|
||||||
&& ttValue < alpha + 200 + 100 * depth
|
|
||||||
&& tte->depth() >= depth;
|
|
||||||
|
|
||||||
// Calculate new depth for this move
|
// Calculate new depth for this move
|
||||||
newDepth = depth - 1;
|
newDepth = depth - 1;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue