/polyssimo

One script to tile them all

Primary LanguageJupyter Notebook

polyssimo

So I found this tetris-reminiscent puzzle game by Alain Brobecker at a friend's place. The goal is to tile a 7-by-7 square using wooden pieces, starting from a given configuration. Here's an example:

Solution to challenge 21

We solved most of the puzzles fairly quickly, except for challenge number 30, shown below, which stubbornly resisted all our attempts:

Challenge 30

To save my dignity (at least to some extent), I decided to create this little notebook. It uses JAX to find possible tile placements (using convolutions), which allows pruning the search tree if the board can't be covered or tiles cannot be placed anymore. Unfortunately, the logic is not jittable, so it's not particularly fast, but it does find the solution to the infamous challenge number 30 in about 5 minutes:

Solution to challenge 30

It would be interesting to try this again with a declarative or logic-based approach.