From 313b9b197b70ca0fbf92c6d097738d0d94c31d4e Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 27 May 2013 22:54:24 +0200 Subject: [PATCH] Implement null move --- hachu.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) 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); } } -- 1.7.0.4