Index en-passant zobrist keys by file

Instead of by square. This is a more conventional
approach, as reported also in:

http://chessprogramming.wikispaces.com/Zobrist+Hashing

We shrink zobEp[] from 64 to 8 keys at the cost of an extra
'and 7' at runtime to get the file out of the ep square.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-02-19 11:28:42 +01:00
parent 3441e0075d
commit ec5b9994b5
2 changed files with 9 additions and 9 deletions

View File

@@ -257,7 +257,7 @@ private:
// Static variables
static Score pieceSquareTable[16][64]; // [piece][square]
static Key zobrist[2][8][64]; // [color][pieceType][square]/[piece count]
static Key zobEp[64]; // [square]
static Key zobEp[8]; // [file]
static Key zobCastle[16]; // [castleRight]
static Key zobSideToMove;
static Key zobExclusion;