From: H.G.Muller Date: Fri, 13 Apr 2018 13:37:28 +0000 (+0200) Subject: Fix periodic upates X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=8eddf31c6220379739703467b99e315bb312ebee;p=crazywa.git Fix periodic upates The 'stat01' commans must report on the move that is currently being searched. Not the one that just has been searched. So the statement to save the root info globally has been moved to before the recursive call. --- diff --git a/dropper.c b/dropper.c index fa1eb00..6efba7b 100644 --- a/dropper.c +++ b/dropper.c @@ -1479,6 +1479,7 @@ Search (int stm, int alpha, int beta, StackFrame *ff, int depth, int reduction, } else { // not a repeat: search it int lmr; search: + if(ply == 0) rootFirst = m.firstMove, rootLast = moveSP, rootCurrent = curMove, rootPly = iterDepth; lmr = (curMove >= m.late) + (curMove >= m.drops); f.tpGain = f.newEval + ff->pstEval; // material gain in last two ply if(ply==0 && randomize && moveNr < 10) ran = (alpha > INF-100 || alpha <-INF+100 ? 0 : (f.newKey*ranKey>>24 & 31)- 16); @@ -1531,7 +1532,6 @@ printf("%d:%d:%d %2d. %08x %c%d%c%d %6d %6d %6d\n",ply,depth,iterDepth,curMove,m alpha = bestScore - margin; } } - if(ply == 0) rootFirst = m.firstMove, rootLast = moveSP, rootCurrent = curMove, rootPly = iterDepth; } // move loop // stalemate correction