From: Gary Linscott Date: Sun, 10 Mar 2013 09:06:39 +0000 (+0100) Subject: Check for easy move just once X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=a24da071f0d6128c633febab7df55f14475217c3 Check for easy move just once Here the rational seems to be that if after one try easy move detection fails then the easy move is not so easy :-) After 15563 games at 60+0.05 ELO: 3.04 +-5.5 (95%) LOS: 97.0% Total: 15563 W: 2664 L: 2528 D: 10371 No functional change. --- diff --git a/src/search.cpp b/src/search.cpp index 40a887c2..cff8e768 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -293,6 +293,7 @@ namespace { Stack ss[MAX_PLY_PLUS_2]; int depth, prevBestMoveChanges; Value bestValue, alpha, beta, delta; + bool triedEasyMove = false; memset(ss, 0, 4 * sizeof(Stack)); depth = BestMoveChanges = 0; @@ -439,10 +440,12 @@ namespace { // Stop search early if one move seems to be much better than others if ( depth >= 12 && !stop + && !triedEasyMove && PVSize == 1 && ( RootMoves.size() == 1 || Time::now() - SearchTime > (TimeMgr.available_time() * 20) / 100)) { + triedEasyMove = true; Value rBeta = bestValue - 2 * PawnValueMg; (ss+1)->excludedMove = RootMoves[0].pv[0]; (ss+1)->skipNullMove = true;