Use CECP mate-score convention
authorH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 6 Feb 2017 19:54:09 +0000 (20:54 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 6 Feb 2017 19:54:09 +0000 (20:54 +0100)
Mate in N is now printed as 100000+N.

dropper.c

index ae671ce..2f12c4f 100644 (file)
--- a/dropper.c
+++ b/dropper.c
@@ -1289,7 +1289,8 @@ printf("%d:%d:%d %2d. %08x %c%d%c%d %6d %6d %6d\n",ply,depth,iterDepth,curMove,m
                    tail = pvPtr; pvPtr = pvStart; *pvPtr++ = moveStack[curMove]; // alpha < score < beta: move starts new PV
                    while(*pvPtr++ = *tail++); // copy PV of daughter node behind it (including 0 sentinel)
                    if(ply == 0) { // in root we print this PV
-                       printf("%d %d %d %d", iterDepth, score, ReadClock(0)/10, nodeCount);
+                       int xbScore = (score > INF-100 ? 100000 + INF - score : score < 100-INF ? -100000 - score - INF : score);
+                       printf("%d %d %d %d", iterDepth, xbScore, ReadClock(0)/10, nodeCount);
                        for(tail=pvStart; *tail; tail++) printf(" %s", MoveToText(*tail));
                        printf("\n"); fflush(stdout);
                    }