Klotski Puzzle: One Horizontal and Four Verticals (Three Kingdoms Edition)

Klotski Puzzle: One Horizontal and Four Verticals (Three Kingdoms Edition)
Loading the math board and drawing, please wait…
2020-11-14 16:31
This GeoGebra applet demonstrates the classic Klotski sliding block puzzle, featuring the One Horizontal and Four Verticals layout with a Three Kingdoms theme. Users can drag rectangular blocks of varying sizes within a confined grid to find the optimal path and move the target block to the exit. Utilizing polygon constructions, translation transformations, and interactive buttons, this model serves as an excellent interactive mathematical tool for developing spatial logic reasoning and algorithmic optimization thinking. The applet presents a 4-by-5 grid containing one large 2-by-2 block representing the central commander, four 1-by-2 vertical blocks representing elite generals, and four 1-by-1 small blocks representing soldiers. Players must navigate all blocks strategically, sliding them only horizontally or vertically into adjacent empty spaces, until the large commander block reaches the designated exit at the bottom of the grid. The interactive design allows students to explore permutations and combinations inherent in the puzzle, observe how different move sequences affect the total step count, and gradually develop intuition for efficient problem-solving strategies. Teachers can use this applet to introduce concepts such as state-space searching, breadth-first search algorithms, and combinatorial optimization in an engaging, visual context. The clean interface and responsive拖动 interactions make it accessible for learners at various levels, while the underlying mathematical structure offers depth for advanced students interested in computational thinking and discrete mathematics.

GeoGebra Commands & Parameters

  1. Polygon({PA, PA + (2, 0), PA + (2, 2), PA + (0, 2)}) → blockA
  2. Polygon({P1, P1 + (1, 0), P1 + (1, 2), P1 + (0, 2)}) → block1
  3. Polygon({P2, P2 + (1, 0), P2 + (1, 2), P2 + (0, 2)}) → block2
  4. Polygon({P3, P3 + (1, 0), P3 + (1, 2), P3 + (0, 2)}) → block3
  5. Polygon({P4, P4 + (1, 0), P4 + (1, 2), P4 + (0, 2)}) → block4
  6. Polygon({P5, P5 + (2, 0), P5 + (2, 1), P5 + (0, 1)}) → block5
  7. Polygon({P6, P6 + (1, 0), P6 + (1, 1), P6 + (0, 1)}) → block6
  8. Polygon({(0, 0), (0, 5), (4, 5), (4, 0), (3, 0), (3, -0.5), (4.5, -0.5), (4.5, 5.5), (-0.5, 5.5), (-0.5, -0.5), (1, -0.5), (1, 0)}) → wall
  9. Polygon({P7, P7 + (1, 0), P7 + (1, 1), P7 + (0, 1)}) → block7
  10. Polygon({P8, P8 + (1, 0), P8 + (1, 1), P8 + (0, 1)}) → block8
  11. Polygon({P9, P9 + (1, 0), P9 + (1, 1), P9 + (0, 1)}) → block9
  12. Polygon({T1, T1 + (1, 0), T1 + (1, 1), T1 + (0, 1)}) → blank1
  13. Polygon({T2, T2 + (1, 0), T2 + (1, 1), T2 + (0, 1)}) → blank2
  14. Polygon({(1, 0), (1, -1), (3, -1), (3, 0)}) → goal
  15. Circle(A, 0.5) → c
  16. Point(c) → B
  17. Polygon({(0.5, 0.2), (0.5, 4.8), (3.5, 4.8), (3.5, 0.2)}) → poly__rule
  18. Polygon({(-0.5, -0.5), (-0.5, 5.5), (4.5, 5.5), (4.5, -0.5)}) → maps

AI Drawing Prompt Reference

Draw a Klotski sliding block puzzle on a 4x5 grid, featuring a 2x2 large block as the central commander, four 1x2 vertical blocks as elite generals, and four 1x1 small blocks as soldiers, along with a target block and an exit. The large block is in the center, surrounded by generals and soldiers, with the exit at the bottom. Use polygon constructions and transformations to draw walls, blank spaces, and rule areas, showcasing the puzzle layout and movement space.
The prompt above was compiled from the original drawing commands and is for reference only.