Skip to content

fix: make debug single-game simulator rule-compliant#130

Merged
nodots merged 1 commit into
developmentfrom
fix/sim-driver-rule-compliance
May 31, 2026
Merged

fix: make debug single-game simulator rule-compliant#130
nodots merged 1 commit into
developmentfrom
fix/sim-driver-rule-compliance

Conversation

@nodots

@nodots nodots commented May 31, 2026

Copy link
Copy Markdown
Owner

Follow-up to #129. The smoke suite's simulate-ten-games test failed with stuck: true because runDebugSingleGame (a separate naive driver from EngineRunner) picked the first legal move and breaked on any Game.move error. With the new must-use-both-dice / must-use-larger-die enforcement, its greedy choice strands a die, Game.move throws, and the turn never completes → loops to the 1000-turn limit.

Fix: gather candidate (checker, die) pairs across all ready dice and try each, skipping moves the engine rejects for a rule violation — same pattern as the EngineRunner fix in #129. Verified 30/30 games complete with 0 stuck locally.

runDebugSingleGame picked the first legal move and broke on any Game.move
error, so the must-use-both-dice / must-use-larger-die enforcement made it
strand a die, throw, and loop to the turn limit (stuck=true). Gather
candidates across all ready dice and skip rule-rejected moves, matching the
EngineRunner driver.
@nodots
nodots merged commit 72b8372 into development May 31, 2026
1 check passed
@nodots
nodots deleted the fix/sim-driver-rule-compliance branch May 31, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant