Skip to content

Conversation

@lemmy
Copy link
Member

@lemmy lemmy commented Jan 13, 2026

animation

Included a detailed comment in the SlidingPuzzles.tla file outlining the optimal solution of 81 moves for the Klotski puzzle, referencing the multi-position slide counting method and noting that TLC's trace will be longer due to individual piece movements.

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
@lemmy lemmy force-pushed the mku-anims branch 3 times, most recently from d1b395e to 518fb56 Compare January 13, 2026 18:38
Introduced new configuration and TLA+ files for the SlidingPuzzles animation, defining layout constants, piece color mapping, goal positions, and rendering logic for the puzzle grid and indicators. This addition enhances the visual representation of the Klotski puzzle and supports interactive debugging.

Note: The AI required substantial guidance because the specification is too high-level to assign a stable, unique identity to each board piece. As a result, coloring individual pieces is unreliable: pieces may appear to change or swap colors during the animation.
Unless the original specification is extended to preserve a unique identity for each piece, the only viable way to establish identity is by tracking each piece through its sequence of moves. In TLA+, this would necessarily require introducing a history variable.

After switching to a color scheme based on piece type (1×1, 2×1, 1×2, 2×2), the AI still failed to identify the straightforward mapping—based on cardinality and orientation—needed to distinguish these types.

Co-authored-by: Claude Sonnet 4.5 <sonnet@anthropic.com>
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@lemmy lemmy merged commit c7dc34e into master Jan 13, 2026
14 of 15 checks passed
@lemmy lemmy deleted the mku-anims branch January 13, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants