Skip to content

Commit

Permalink
Try new strategy to limit double extensions
Browse files Browse the repository at this point in the history
bench 6217697
  • Loading branch information
TopoIogist committed Sep 17, 2021
1 parent 723f48d commit afe45fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1069,10 +1069,10 @@ namespace {
extension = 1;
singularQuietLMR = !ttCapture;

// Avoid search explosion by limiting the number of double extensions to at most 3
// Avoid search explosion by limiting the number of double extensions
if ( !PvNode
&& value < singularBeta - 93
&& ss->doubleExtensions < 3)
&& value < singularBeta - 51 - 50*std::min(1,ss->doubleExtensions)
&& ss->doubleExtensions <= 5)
{
extension = 2;
doubleExtension = true;
Expand Down

6 comments on commit afe45fb

@Vizvezdenec
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a side note that - 51 - 50*std::min(1,ss->doubleExtensions) should be the same as -51 - 50 * bool(ss->doubleExtensions)

@TopoIogist
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, this is actually doing the opposite of what i intended it to do KEKL

@Vizvezdenec
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

congrats!

@snicolet
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TopoIogist

Hi, I was wondering what happens with this patch for the endgame position
which lead to official-stockfish#3544
This is a position where each black move is singular, so the search explodes
quite easily (this is related to issue official-stockfish#3532 )

./stockfish
ucinewgame
position fen 8/Pk6/8/1p6/8/P1K5/8/6B1 w - - 37 130
go infinite

@TopoIogist
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snicolet I let this position run with both this patch and the master for about a minute
With this patch I reach:
info depth 18 seldepth 29 multipv 1 score cp 189 upperbound nodes 32257735 nps 4036758 hashfull 185 tbhits 0 time 7991 pv c3d2 b7a8
with the master:
info depth 18 seldepth 32 multipv 1 score cp 211 upperbound nodes 58152365 nps 4659644 hashfull 141 tbhits 0 time 12480 pv c3b3 b7a8

So it does not seem to be much worse... Of course there may be other bad positions. Not that the <=5 was just guesstimated, if this is a concern
maybe it could be retested with a tighter limit.

@Mindbreaker1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats!

Please sign in to comment.