Packing Puzzle Solver

1. The box
Measured in cubes. Height 1 is a flat tray.
Or start from a classic:
2. The pieces
Pieces 0 cubes.

How to use the packing puzzle solver

Set the box first, in cubes: a flat tray is one cube high. Then describe the pieces. Tap Draw a piece and fill in the squares it covers; for a solid piece, Layer 1 is the bottom and each layer above sits on it, and the drawing beside the grid shows the piece in 3D as you go, so you can check it matches the one in your hand. If your puzzle uses a standard set, add it whole from Add a set.

Then press Find how they fit. The first arrangement appears as soon as it is found, drawn in 3D and as layers from the bottom up, in the same colours as the pieces. The count keeps going in the background until every possibility has been tried, and you can step through the arrangements it keeps.

Draw each piece the way it actually is. The solver turns every piece every way it can go, so it does not matter how you draw it; it only matters that the shape is right.

What is a packing puzzle?

A set of pieces and a box, and the job of getting all the pieces into the box. The pieces are usually built from unit cubes or squares, which is what makes them describable here, and the difficulty is that almost every arrangement that looks promising leaves one awkward gap at the end. Some fill the box completely; others leave deliberate empty space, and the solver handles both: if the pieces add up to less than the box, it is allowed to leave cells empty.

Turning, flipping and mirror images

A real piece can be turned any way you like, so the solver tries every orientation. For a flat tray that includes turning a piece over, because a flat piece flipped is still the same piece. What a piece can never do is become its own mirror image. A solid piece and its mirror twin are two different pieces, the way a left glove is not a right glove, and the Soma cube has exactly such a pair. Draw both and the solver keeps them apart.

What it does not do: getting them in

This answers whether the pieces fit, and how. In a lot of the best packing puzzles that is not the hard part. The box has a narrow opening, or the pieces have to be turned inside it, and finding the arrangement is the easy half of the work. The solver does not model the lid or the way in, so if it shows an arrangement and you still cannot get there, the puzzle is asking you something else: the order the pieces go in, and how they move once they are inside.

How the count works

Each arrangement is counted once however you turn the box, so the same answer seen from the other side is not counted twice. Two identical pieces swapped over are not a new answer either.

The counts were checked against known results before this page went up. Twelve pentominoes in a 6 by 10 box give 2,339 arrangements, in 5 by 12 give 1,010, in 4 by 15 give 368, and in 3 by 20 only 2. The Soma cube gives 480; the usual figure is 240, because that one also counts each answer and its mirror image as the same, which means swapping the two mirror pieces as well.

More on packing puzzles

The kinds, the history and the best ones to start with are in packing puzzles explained. The range we make is split into 2D packing puzzles, the flat trays, and 3D packing puzzles, the boxes. Good places to start are the Fish Tank, with three pieces, and Waltz, which asks you to pack only two.

For the Soma cube itself, the Soma cube shapes page lists the classic figures with their solutions, and there are more solvers on the puzzle tools page.

Frequently Asked Questions

What is a packing puzzle?

A set of pieces and a box, and the job of getting every piece into the box. The pieces are usually built from unit squares or cubes, and the difficulty is that almost every arrangement that looks promising leaves one awkward gap at the end.

How do you solve a packing puzzle?

Start with the pieces that have the fewest ways to go, usually the longest or the most awkward, and put them against the walls and corners, where they have least choice. If you are stuck for good, draw the pieces and the box into this solver and it shows every arrangement that works, or tells you plainly that none does.

Can a packing puzzle have more than one solution?

Often thousands. Twelve pentominoes fill a 6 by 10 box 2,339 ways, but only 2 ways in a 3 by 20. The solver counts them, each counted once however you turn the box.

What is the difference between 2D and 3D packing puzzles?

A 2D packing puzzle is a flat tray, one layer deep, and its pieces can be turned over. A 3D one is a box filled in layers. Set the height to 1 for a tray and anything more for a box.

Why can I not get the pieces in when the solver says they fit?

Because in many packing puzzles the arrangement is not the hard part. The box has a narrow opening, or the pieces have to be turned once they are inside, and the order you put them in matters. The solver shows how they fit, not the way in.