mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Revert "Shuffle detection #2064"
It causes a serious regression hanging a simple fixed
depth search. Reproducible with:
position fen q1B5/1P1q4/8/8/8/6R1/8/1K1k4 w - - 0 1
go depth 13
The reason is a search tree explosion due to:
if (... && depth < 3 * ONE_PLY)
extension = ONE_PLY;
This is very dangerous code by itself because triggers **at the leafs**
and in the above position keeps extending endlessly. In normal games
time deadline makes the search to stop sooner or later, but in fixed
seacrch we just hang possibly for a very long time. This is not acceptable
because 'go depth 13' shall not be a surprise for any position.
This patch reverts commit 76f1807baa
.
and fixes the issue https://github.com/official-stockfish/Stockfish/issues/2091
Bench: 3243738
This commit is contained in:
parent
5b5687d76e
commit
5928cb2b30
1 changed files with 0 additions and 13 deletions
|
@ -607,15 +607,6 @@ namespace {
|
|||
: ttHit ? tte->move() : MOVE_NONE;
|
||||
ttPv = (ttHit && tte->is_pv()) || (PvNode && depth > 4 * ONE_PLY);
|
||||
|
||||
// if position has been searched at higher depths and we are shuffling, return value_draw
|
||||
if (pos.rule50_count() > 36
|
||||
&& ss->ply > 36
|
||||
&& depth < 3 * ONE_PLY
|
||||
&& ttHit
|
||||
&& tte->depth() > depth
|
||||
&& pos.count<PAWN>() > 0)
|
||||
return VALUE_DRAW;
|
||||
|
||||
// At non-PV nodes we check for an early TT cutoff
|
||||
if ( !PvNode
|
||||
&& ttHit
|
||||
|
@ -934,10 +925,6 @@ moves_loop: // When in check, search starts from here
|
|||
&& (pos.blockers_for_king(~us) & from_sq(move) || pos.see_ge(move)))
|
||||
extension = ONE_PLY;
|
||||
|
||||
// Shuffle extension
|
||||
else if(pos.rule50_count() > 14 && ss->ply > 14 && depth < 3 * ONE_PLY && PvNode)
|
||||
extension = ONE_PLY;
|
||||
|
||||
// Castling extension
|
||||
else if (type_of(move) == CASTLING)
|
||||
extension = ONE_PLY;
|
||||
|
|
Loading…
Add table
Reference in a new issue