From: H.G. Muller Date: Mon, 27 May 2013 20:54:24 +0000 (+0200) Subject: Implement null move X-Git-Tag: 0.18~52 X-Git-Url: http://winboard.nl/cgi-bin?p=hachu.git;a=commitdiff_plain;h=313b9b197b70ca0fbf92c6d097738d0d94c31d4e Implement null move --- diff --git a/hachu.c b/hachu.c index c9350ae..58f6334 100644 --- a/hachu.c +++ b/hachu.c @@ -18,6 +18,7 @@ #define HASH #define KILLERS +#define NULLMOVE #include #include @@ -1633,10 +1634,10 @@ if(flag && depth>= 0) printf("phase=%d: first/curr/last = %d / %d / %d\n", phase bestScore = curEval; resDep = QSdepth; if(bestScore >= beta || depth < -1) goto cutoff; } -#if 0 - if(curEval >= beta) { +#ifdef NULLMOVE + else if(curEval >= beta) { stm ^= WHITE; - score = -Search(-beta, -iterAlpha, -difEval, depth-3, promoSuppress & SQUARE, ABSENT); + score = -Search(-beta, 1-beta, -difEval, depth > 3 ? depth-3 : 0, promoSuppress & SQUARE, ABSENT); stm ^= WHITE; if(score >= beta) { msp = oldMSP; retDep += 3; return score + (score < curEval); } }