From f5e6d07915a206bdc2af3fbe1e91ebcdbf853d18 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Mon, 29 May 2017 17:38:03 +0200 Subject: [PATCH] Make sure no early move generation in null-move reply Now that we explicitly test for pinning of the e.p. victim, early move generation (to test for King capture) is only needed after King moves. But the toPiece on which we test this can be undefined after null move. Rather than explicitly testing for null move when setting earlyGen, we set toPiece to a Pawn when making the null move. --- dropper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dropper.c b/dropper.c index 9a7bd00..5a7d54e 100644 --- a/dropper.c +++ b/dropper.c @@ -1220,7 +1220,7 @@ if(PATH)printf(" Hit, d=%d, checker = %x\n",entry->depth,f.checker); f.mutation = -2; // kludge to suppress testing for discovered check f.newEval = f.pstEval; f.newKey = f.hashKey; - f.epSqr = -1; f.fromSqr = f.toSqr = f.captSqr = 1; f.toPiece = board[1]; + f.epSqr = -1; f.fromSqr = f.toSqr = f.captSqr = 1; f.toPiece = stm; // fake Pawn to suppress early move gen in reply node deprec[ply] = maxDepth << 16 | depth << 8; path[ply++] = 0; score = -Search(stm, -beta, 1-beta, &f, nullDepth, 0, nullDepth); ply--; -- 1.7.0.4