Tetronimo Tiling with given tiles : How to eliminate early cases where no solution exist

317 Views Asked by At

I've created a javascript block puzzle solver, that finds the solution to tetronimo based block puzzle on a user-defined X*Y sized board.

My issue is that I'd like to avoid calculation altogether if there is a mathematical formula or some approach that can quickly determine if the puzzle is solvable.

There is no point in wasting computer power on running brute force process of testing all tetrominoes if the board has no solution.

So, for example, in this case, I have selected 8 Blocks: J,J,L,L,O,O,O,O and board dimensions of 8 x 4. I've calculated the solution by going through all possible combination. Similarly, I'd like to know ahead of time that there is a solution.

The puzzle is available on GitHub as open source code if someone wants to contribute directly to the code base: https://github.com/JozefJarosciak/TetronimoPuzzleSolver

enter image description here