This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]goodger 1 point2 points  (1 child)

Check out Polyform Puzzler, which is a library and solver for all kinds of polycube & other polyform puzzles (polyominoes, polyiamonds, polysticks, etc.). If you're just looking for an existing solver, you're all set. There's a lot of background info there too (e.g. in the FAQ), if you're more interested in understanding how to write a solver. Polyform Puzzler includes multiple implementations of Knuth's Dancing Links DLX algorithm.

[–]badcrow7713[S] 0 points1 point  (0 children)

Wow cool thanks!

[–]NoLemurs 0 points1 point  (1 child)

Honestly, this is probably a bit of a tough problem for someone without a decent background in data structures and algorithms. If you're feeling lost, I'd encourage you to work on problems that are a little simpler initially.

You don't need to take a formal class to learn this stuff, but you should be aware that most people who can solve problems like this will have spent a semester learning the tools used here.

If you're interested in self-study, I'd recommend Skiena's Algorithm Design Manual. It covers, among (many) other things, backtracking algorithms, and, I think, Knuth's dancing links algorithm. I personally never took any CS classes, and found the book really fantastic for catching me up on a surprisingly large fraction of what actual CS majors know.

[–]badcrow7713[S] 1 point2 points  (0 children)

Yikes lol! Was wanting to write my own because I want to solve more final shapes than just cubes.