From 50bd0b428428f31e30f7aaf6f880deb42d7095c7 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Mon, 15 May 2017 15:01:53 +0200 Subject: [PATCH] Return a depth with repeats When a move is detected to lead to a repeat, we return the corresponding score with a validity depth just enough to satisfy the current depth request. This prevents earlier positions contaminated by the score to last unnecessarily long in the hash table. --- dropper.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dropper.c b/dropper.c index ced95b2..78b97cc 100644 --- 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 + f.depth = (score >= beta ? highDepth+1 : iterDepth); // minimum required depth *pvPtr = 0; // fake that daughter returned empty PV } else { // not a repeat: search it int lmr; -- 1.7.0.4