The Goal
Klotski (华容道, Huarong Dao) is a classic sliding block puzzle. The objective is to guide the large red 2x2 block (Cao Cao) to the escape opening at the bottom center of the board by sliding all blocks into adjacent empty spaces.
How to Play
- Manual play: Click/tap a block, or navigate using your keyboard and press Enter/Space, then slide/move it into an adjacent space.
- Solver navigation: Use the Next and Prev buttons (or Right/Left Arrow keys) to step through the shortest solution path.
- Auto Play: Click Auto (or press the Space key) to watch the Dijkstra AI solver automatically play the optimal path.
- Create Layouts: Click Create Game to design custom configurations, drag pieces onto the board, and let the AI find the optimal solution.
Key Concepts
- Min Moves
- The absolute fewest moves required to solve the puzzle from the starting configuration, calculated using Dijkstra's shortest path algorithm.
- Combine Moves
- When enabled, sliding the same block consecutively in a sequence counts as a single move. When disabled, every individual cell-by-cell slide is counted as a separate move.
Powered by Dial's Dijkstra Solver Engine & Zobrist Hashing — 100% Client-Side