Day 12: Shape Packing (Backtracking)
Input (Shapes then Regions)
Load
Region
Shuffle seed
Auto cycle regions
Enable
Delay (ms)
Board:
-
Required area:
-
Placed / Remaining:
-
Nodes (DFS):
0
Status:
Ready
Run
Step
Reset
Rebuild
Simulation speed
How to read this:
- The solver always targets the first empty cell (top-left scan).
- It tries remaining shapes (larger first), all rotations/flips, aligned so one of the shape cells hits the target.
- If nothing fits, it can mark the cell as
unused
(because the pack doesn’t need to fill the whole region).
Shapes (index / area)
Empty
Unused
Target cell
Candidate placement