From 6768207263f5dc1eb1a6629ed7b1367a8ca3aa45 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Wed, 27 Jan 2016 11:22:42 +0100 Subject: [PATCH] Fix book probing The Zobrist key for Kings had been inadvertantly changed in the patch that assigned new keys to the pieces added for Chu Shogi (the 'chu-promoted series'), because the King would be considered as a chu-promoted piece. --- book.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/book.c b/book.c index 090ae1b..6a257d8 100644 --- a/book.c +++ b/book.c @@ -315,7 +315,7 @@ hash (int moveNr) if(p != EmptySquare){ int j = (int)p, promoted = 0; j -= (j >= (int)BlackPawn) ? (int)BlackPawn :(int)WhitePawn; - if(j >= CHUPROMOTED WhitePawn) promoted++, j -= CHUPROMOTED WhitePawn; + if(j >= WhiteTokin && j != WhiteKing) promoted++, j -= WhiteTokin; if(j > (int)WhiteQueen) j++; // make space for King if(j > (int) WhiteKing) j = (int)WhiteQueen + 1; p_enc = 2*j + ((int)p < (int)BlackPawn); -- 1.7.0.4