The Developer’s Cry

a blog about computer programming

Pentominoes (part 1, the puzzle)

Pentominoes is a puzzle game in which you arrange oddly shaped pieces into a rectangle. The puzzle pieces each consist of five units (pento is latin for five). The science-y name for such geometric shapes is polyomino, which sounds very mathematical, but it’s not to be confused with the term polynomial, which is an entirely different thing. Anyway, pieces may be rotated, mirrored, flipped to be made to fit inside the rectangular box. Even though there are thousands of unique solutions, the puzzle is too difficult for most people to solve. You can give it a try yourself (note: keyboard and mouse required).

Usage

This puzzle was written in TypeScript, just for fun. Writing a solver is still on my bucket list (spoiler: it’s a backtracking problem). A more challenging variant of the puzzle is stacking the pieces in a 3D box, which also has multiple solutions for varying box sizes.

Moreover, higher order polyominoes, such as hexominoes, also exist.