diff --git a/src/position.cpp b/src/position.cpp index bc8e92a1..aa06db08 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -40,11 +40,8 @@ namespace Zobrist { Key enpassant[FILE_NB]; Key castling[CASTLING_RIGHT_NB]; Key side; - Key exclusion; } -Key Position::exclusion_key() const { return st->key ^ Zobrist::exclusion; } - namespace { const string PieceToChar(" PNBRQK pnbrqk"); @@ -132,7 +129,6 @@ void Position::init() { } Zobrist::side = rng.rand(); - Zobrist::exclusion = rng.rand(); } diff --git a/src/position.h b/src/position.h index 7fce1dbb..c974f1bd 100644 --- a/src/position.h +++ b/src/position.h @@ -150,7 +150,6 @@ public: // Accessing hash keys Key key() const; Key key_after(Move m) const; - Key exclusion_key() const; Key material_key() const; Key pawn_key() const; diff --git a/src/search.cpp b/src/search.cpp index 7fafe933..c12f0862 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -622,7 +622,7 @@ namespace { // search to overwrite a previous full search TT value, so we use a different // position key in case of an excluded move. excludedMove = ss->excludedMove; - posKey = excludedMove ? pos.exclusion_key() : pos.key(); + posKey = pos.key() ^ Key(excludedMove); tte = TT.probe(posKey, ttHit); ttValue = ttHit ? value_from_tt(tte->value(), ss->ply) : VALUE_NONE; ttMove = rootNode ? thisThread->rootMoves[thisThread->PVIdx].pv[0]