Get the latest tech news
Solving a wooden puzzle using Haskell
April 28, 2025 This post is the first of a two-part series that describes my computer-assisted solution to a physical puzzle I got. In this first part, I describe the problem and model it in Haskell.
After receiving it, I spent a couple minutes trying to solve it, but it quickly became clear that, unless there was a trick I'd missed, I didn't have the right combination of patience and brainpower for that. The puzzle is easy enough to understand, and the fact that it's basically all composed of cubes hints at the discrete nature of the problem, suggesting that it would lend itself well to an algorithm search. We're pretty much done for this first blog post, but I'd like to prepare for the next one with one last step: our Disposition datatype served us well, but all we will need now to solve the puzzle is the actual coordinates of the cubes that compose the pieces.
Or read this on Hacker News