Recommended Free Tools
Implement a chess-position Zobrist hash as the XOR of deterministic keys for the position’s active features: piece-and-square pairs, side to move, castling rights, and en-passant state. Update it by XORing out features that change and XORing in their replacements. Keep a full recomputation routine as a correctness check, especially for special moves.
What a chess-position hash must represent
A Zobrist key is a compact value formed by XORing a key for each feature present in a position. Each piece’s identity includes its color and type, and its square determines which piece-square key to use. Position state that changes legal continuations or the identity rules your program uses must also be represented consistently.
Stockfish’s current source uses piece-square keys, keys for castling-rights combinations, en-passant-file keys, and a side-to-move key. Its position setup walks occupied squares and XORs the corresponding piece keys, then adds applicable state keys. It XORs the side key when Black is to move. See Stockfish’s position implementation and position declarations; these links point to a moving master branch, so implementation details can change.
Feature table
A direct design uses one key for every combination of piece identity and square, plus keys for side to move, castling-rights state, and en-passant state. For example, with 12 colored piece identities and 64 squares, the piece table contains 768 keys. That count follows from the table dimensions; it is not a required layout. Stockfish indexes en-passant keys by file and castling keys by the castling-rights combination.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →#1 Best Overall
- Master-Level AI Engine: Adjustable difficulty, ELO 2200+, ideal for beginners to advanced players seeking professional-grade challenges.
- Premium Board & Pieces: Largest-in-class 2.36-inch king and 1.22x1.22-inch squares,14.6-inch in diagonal chess board for clear visibility and comfortable play, avoiding cramped layouts.
- Magnetic Stability: Strong yet balanced magnets secure pieces, even when the board is inverted, ensuring uninterrupted focus during intense matches.
- Intelligent Voice Coaching: AI-driven analysis provides real-time feedback on moves, identifying weaknesses and suggesting optimal strategies.
- Comprehensive Learning Tools: Includes 128 tactical puzzles, 256 classic game scores, and unlimited move takebacks for in-depth study and replay.
Key width and reproducibility
A 64-bit unsigned value is a common practical choice, not a universal requirement. Use a deterministic pseudorandom generator with a fixed seed if you want repeatable keys across runs and easier debugging. Stockfish initializes its generator from a fixed seed. The keys are for indexing and position hashing, not cryptographic protection.
Build the key from a complete position
Implement a recomputation function before optimizing move making. It gives you a simple reference result to compare against after every incremental update.
- Start the key at zero.
- For each occupied square, XOR the key for that piece identity and square.
- XOR the side-to-move key if your chosen convention requires it. A common convention is to include it only when Black is to move.
- XOR the key for the current castling-rights combination.
- If an en-passant square is present under your position semantics, XOR the key associated with its file or other chosen representation.
XOR has the useful property that a feature key applied twice cancels: x ^ k ^ k = x. This makes the same feature table useful both to construct a key and to update it.
Rank #2
- 【Chess Computer for Beginners and Kids】Great chess set for beginners and kids with LEDs to prompt you to move; Talking Chess and can get help prompting moves with the "?" button; FUN levels 1-2 to help beginners learn chess in a fun way, and 1000 built-in stalemate puzzles, all to help you learn chess faster.
- 【Electronic Chess Set for Adults】 Suitable for chess enthusiasts to improve their chess skills. Simulate the real game scenario, time play, and support two violations of the judgments, etc. You can experience the authentic game atmosphere, constantly improve your chess skills and adjust your game status.
- 【Computer Chess Game】Vonset L6 has rich level settings covering the level distribution from entry to proficiency. This chess computer has a strength of up to 2300 ELO (International tournament standard), which corresponds to the level of the Grandmaster and is suitable for most chess players. Note: The level setting applies to both training mode and match mode.
- 【Electronic Chess Board】With HD E-ink screen, it can be easily viewed under any light source to protect your eyes; Built-in rechargeable battery, it can be used for up to 8 hours with a full charge; Built-in storage box inside the board, when you don't want to play chess, store the pieces in it, it is convenient to store the chess pieces to avoid losing the chess pieces.
- 【Magnetic Chess Game】L6 chess sets with a magnetic chess board and pieces. Chess pieces are not easily dislodged when playing chess. You can play chess in a mobile environment. It can be used at home, school, outdoor camping, or traveling.2 extra queens are available for you to use as free accessories.
Update the hash when a move is made
For each move, remove keys for features that cease to exist and add keys for features that become active. Update state keys around the state change: XOR out the old castling or en-passant key before changing that state, then XOR in the new one afterward. Toggle the side-to-move key once per move if your convention represents the side that way.
Ordinary move and capture
- XOR out the moving piece’s key at its source square.
- If a piece is captured, XOR out the captured piece’s key at its square.
- XOR in the moving piece’s key at its destination square.
- Update castling rights and en-passant state as appropriate, replacing their old state keys with the new ones.
- Toggle the side-to-move key.
Promotion
A promotion changes the piece identity as well as its square. XOR out the pawn’s source-square key, remove any captured piece key, and XOR in the promoted piece’s destination-square key. Do not add a pawn key at the destination.
En-passant capture
The captured pawn is not on the moving pawn’s destination square. XOR out the captured pawn using its actual square behind the en-passant target, then move the capturing pawn’s piece-square feature as usual. Also replace the old en-passant-state key with the resulting state, which will normally have no en-passant square after the move.
Rank #3
- Product Dimensions: 12.6x12.13x0.9 inches (32x30.8x2.3 cm); Game area: 8.8x8.8 inches(22.5x22.5 cm); Each square: 1.1 inches (28x28mm). King height: 2 in. Package list: Electronic chess board, 34 pieces (with extra double queen), two drawstring storage bags, manual, charger cable.
- Electronic Chess Board: Built-in AI intelligent algorithms, with 1-18 levels for beginners to intermediate players. Play against the computer or a friend, and challenge yourself anytime. The P6 Chess Computer supports up to 1700 ELO.
- Smart Chess Board: Offers three modes: Training for beginners and kids, Match for improving skills with the device, and Human for two-player games with friends or family. Enjoy leisure time and choose the mode that suits your practice needs.
- Learn Chess: The P6 features 200 puzzles to enhance your skills. Training mode offers light prompts and voice announcements for each move. Press the '?' button for hints when needed, making learning and playing chess easier.
- Strong Magnetic Chess Pieces: Features strong magnetic adsorption, keeping pieces secure even when shaken. Move them easily without worry, whether at home or on the go.
Castling
Castling moves both king and rook. XOR out both pieces at their source squares and XOR them in at their destination squares. Replace castling-rights state as needed, then update the side-to-move key.
Choose consistent position-state semantics
Castling rights
Hash the rights that remain, not merely the current locations of kings and rooks. A king or rook can move away and return, but the lost right does not return. Positions with identical piece placement and different remaining castling rights should therefore receive different state features.
En-passant state
Pick and consistently apply a rule for en-passant state. Stockfish’s implementation uses an en-passant file key when its position state has an en-passant square. A FEN target square that cannot actually be captured presents a semantic choice: whether to include it depends on how your program defines position equivalence and repetition. The implementation reference does not settle every possible convention, so use the same rule in FEN loading, move making, repetition detection, and hash recomputation.
Rank #4
- 🪵FULL PIECE RECOGNITION WITH WOODEN-LOOK BOARD - Chessnut Air features a durable plastic-and-wood board with plastic sensor-chip pieces. Beautifully crafted wooden board with embedded LED lights that indicate moves and game status.
- 🏋️PLAY ONLINE WITH REAL PIECES - Connect through compatible Chessnut apps and integrations to play on supported online chess platforms, including Chess-com and Lichess. Opponent moves are shown on the physical board with built-in LED indicators.
- ♟️AI TRAINING & GAME ANALYSIS VIA CHESSNUT APP - Practice against AI with adjustable difficulty, review positions, and analyze completed games through the Chessnut App. A practical choice for beginners building habits and experienced players sharpening tactics.
- 🎯OTB CHESS GAME RECORDING - Use Chessnut Air for face-to-face over-the-board games and store up to 20 games for later review or export.
- ✈️COMPACT ELECTRONIC CHESS SET - The 13 x 13 x 0.7 in board offers a clean, classic look with hidden LEDs, while the 2.7 in king height keeps the set comfortable for desk, home, club, or travel play.
Halfmove clock and search context
A board-position key does not automatically encode every piece of search context. The halfmove clock can matter to draw-rule handling, so decide separately whether it belongs in a transposition-table key or in the table entry and search logic. The Stockfish excerpts cited here do not establish a comprehensive policy for this field.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Validate incremental updates
After each move in a debug build, compare the maintained key with the result of recomputing it from the full position. A mismatch localizes errors in state updates far more effectively than testing search results alone.
- Test captures, quiet moves, promotions, and en-passant captures.
- Test castling on both sides and the loss of castling rights after king or rook moves.
- Load positions from FEN and compare their recomputed keys with the keys reached by legal move sequences.
- Test make/unmake round trips. Saving and restoring the previous key during unmake is often simpler and less error-prone than reversing every derived update.
Stockfish separates setup computation from incremental state maintenance; its position source is a useful implementation reference, though its exact update order and state representation are engine-specific.
Use the key safely in a transposition table
A Zobrist key helps a transposition table find positions that may have already been searched, avoiding repeated work. It is a finite-width hash, not collision-free proof that two positions are identical. Table designs can retain verification bits or additional position data when a false match would be costly; the appropriate policy depends on the table and application. The Chess Programming Wiki transposition-table example explains the educational use of keys in this setting, while the MIT OpenCourseWare lecture describes the general idea of combining random feature strings with XOR.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

