I'm writing a program to find all the solutions to the pentominoes puzzle.
https://en.wikipedia.org/wiki/Pentomino
Just to see if I still can. I first did this 40+ years ago, but that program only works for a 6x10 board (box). Someone asked, "Have you got solutions for a 4x15 board?" "No." Okay, I guess I just start all over. And, sadly, I'm not as smart as I was 40 years ago. Buy quite a bit.
SO, to look for solutions, when working the puzzle, find the first empty square, then find a piece that can fit in that location. To fit in a location, the piece must, 1st, not hang over an edge, and 2nd, not be partly laying on top of an existing part of the puzzle. When you're working with real pieces, it's easy to see. When a program is doing that, it's not easy to see. NOT EASY. I just finished a routine (PUZP) to test for pieces hanging over the edge. There are 4 things involved. I've:
1) created a file that shows the bit pattern of every rotation of each of the 12 pieces. There are such 62 rotations.
2. wrote program PUZA to read that file, and create the 62 table entries with bit patterns and more, I'll need later.
3. I just finished PUZP to test the bit patterns and valid locations. (They're good.)
4. Working on PUZB that actually works the puzzle.
https://sites.google.com/site/linlyons/pentominoes-puza contains the source code for the PUZA program.
https://sites.google.com/site/linlyons/pentominoes-puzp contains the source code for the PUZP program
https://sites.google.com/site/linlyons/pentominoes-puzp-report shows the report created by PUZP
https://sites.google.com/site/linlyons/pentominoes-pieces shows the file I made to define the shape that the pieces can be.
PUZB waiting