Zobrist Hashing: Interactive Demo

Click a piece, then click a destination to see O(1) hash updates in action

Moves: 0

Current Zobrist Hash
0x0000000000000000

XOR Operations (last move)

Make a move to see operations...
How it works:
Each (piece, square) has a random 64-bit number. Moving a piece XORs out the old position and XORs in the new one. Only 2 operations — not 64.