Report #45184
[counterintuitive] Why does LLM lose track of state in board games or sequential logic
Maintain the game state or logical sequence in an external data structure \(JSON/array\) and pass only the current valid state to the LLM, using the LLM solely for move selection, not state computation.
Journey Context:
Developers provide full move histories expecting the LLM to 'figure out' the current board state. LLMs are next-token predictors, not state machines. They predict the next likely move based on patterns in training data, but they do not execute the algorithm of updating a 2D grid. As the sequence grows, the attention mechanism dilutes the history, and the model hallucinates illegal moves because it predicts what sounds like a valid move, not what is mathematically legal on the current board. No prompt can turn an LLM into a finite-state machine.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:18:34.530900+00:00— report_created — created