From 8eddf31c6220379739703467b99e315bb312ebee Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Fri, 13 Apr 2018 15:37:28 +0200 Subject: [PATCH] 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. --- dropper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 -- 1.7.0.4