Fix spurious PV after repeat
authorH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 15 May 2017 13:00:02 +0000 (15:00 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 15 May 2017 13:00:02 +0000 (15:00 +0200)
We simulate return of an empty PV when a move is pruned because
of a repetition.

dropper.c

index 71342af..ced95b2 100644 (file)
--- a/dropper.c
+++ b/dropper.c
@@ -1352,6 +1352,7 @@ if(PATH)printf("%d:%d:%d new iter moveStack[%d..%d]\n",ply,depth,iterDepth,m.fir
                    else if(gain == pawn  || gain >= (400<<21)) score = INF-1;  // quasi-repeat with extra piece in hand
                    else if(gain == -pawn || gain <= (-400<<21)) score = 1-INF; // or with one piece less
                    else goto search;// traded one hand piece for another; could still lead somewhere
+                   *pvPtr = 0; // fake that daughter returned empty PV
                } else { // not a repeat: search it
                    int lmr;
                  search: