How a Chess Browser Extension Learns to Tell Games Apart Beyond Just FEN Strings
A developer building ChessNavio, a browser chess extension powered by Stockfish, found that relying solely on FEN strings to identify game states causes problems, particularly during rematches where positions look identical but represent entirely different games. To solve this, the extension tracks a composite identity combining FEN, a board epoch counter, a config revision, and a unique job ID to ensure engine results only display when all four values still match the current board state. Different chess sites required site-specific checklists — for example, Chess.com shows pieces before a game starts, so the extension waits for UI elements like resign and hint buttons to confirm a game is live. The extension also handles asynchronous engine output carefully, since Stockfish continues emitting results after a stop command, meaning stale results must be filtered out at paint time. All engine computation runs locally via Stockfish 18 in WebAssembly, with server interaction limited strictly to account management and optional sync.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in