Mask sort key from move when storing path
authorH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 29 May 2017 16:21:16 +0000 (18:21 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 29 May 2017 16:21:16 +0000 (18:21 +0200)
dropper.c

index 5a7d54e..a2726ae 100644 (file)
--- a/dropper.c
+++ b/dropper.c
@@ -1362,7 +1362,7 @@ if(PATH)printf("%d:%d:%d new iter moveStack[%d..%d]\n",ply,depth,iterDepth,m.fir
                    if(ply==0 && randomize && moveNr < 10) ran = (alpha > INF-100 || alpha <-INF+100 ? 0 : (f.newKey*ranKey>>24 & 31)- 16);
                    repKey[index] = (int)f.newKey & 0x1FFFFF | f.newEval << 21; repDep[index] = ply + moveNr; // remember position
                    // recursion
-                   deprec[ply] = (f.checker != CK_NONE ? f.checker : 0)<<24 | maxDepth<<16 | depth<< 8 | iterDepth; path[ply++] = moveStack[curMove];
+                   deprec[ply] = (f.checker != CK_NONE ? f.checker : 0)<<24 | maxDepth<<16 | depth<< 8 | iterDepth; path[ply++] = moveStack[curMove] & 0xFFFF;
                    score = -Search(stm, -beta, -alpha+ran, &f, iterDepth-1, lmr, highDepth);
                    if(ran && score < INF-100 && score > 100-INF) score += ran;
                    ply--;