That said, I haven't been able to come up with a solution/algorithm outside of brute force. I've searched for various puzzle algorithms but any assumptions regarding puzzle shapes don't fit my simpler criteria so become overly complicated quickly.
I'm calling this a rectangle puzzle rather than a jigsaw puzzle since there is no final picture or restrictions on the overall placement of the pieces.
- There are only 4 possible piece shapes (row x column) : 1x2, 2x1, 2x2, 4x1
- These are the only pieces (ie. they may not be rotated or overlap)
- The play area is 8x4
- The number of pieces will be undetermined at start
- Pieces may exist multiple times or not at all
- The play area does not need to be completely filled
- The only requirement regarding placement is they must fit in the play area
- There is no one solution
End solution: What I would like to output is the various arrangements that exist. In other words, given a set of pieces I'd like to know in what ways they may populate the game area. Given the pieces available among other constraints there will be a finite set of solutions.
For the visually minded please see the images.
Generating a 2D array and fitting the "pieces" via brute force, as said, is possible but I'd prefer to know whether this is already a game of sorts and an algorithm exists. I'm not a math lover so I'm not familiar with any possible solutions that may exist in that space but wouldn't be against investigating if something makes sense.