Burn It All Down

Rubik's Cube-esque tile puzzle game

First Posted: February 6, 2024
Last Updated: February 8, 2024

It was a dark room, except for the west wall. It was illuminated by four panels, two red, a blue, and a green. There were buttons below each of the panels. When pressed, the panel (and adjacent panels) switched their colors: red became blue, blue became green, and green became red. We needed to turn all of these panels red in order to pass.

This was one of the more interesting puzzles we encountered when doing a recent escape room. We ended up using a "skip puzzle" ability we earned on this because it's hard to think when you have single-digit number of minutes remaining to escape and when there are 3 other people in the room also pressing the buttons while you are trying to think. However, this puzzle seemed like something that would be interesting to ponder, so when I got home I had chat GPT code it up. It did a perfect job. I went from idea to code to deployed app all in ~5 min. I could have done it myself in maybe 60 min.

Turns out, it's not that difficult to solve once you think about it for a bit (without all the pressure). What might be more interesting is generalizing the puzzle to a second dimension. Chat GPT struggled to code this by itself, but between the LLM and some good old-fashioned manual software engineering, we now have a new version of the escape room game. This iteration also includes some nifty icons for the color-vision impaired.

Burn it all down

With this 2D puzzle, your goal, like before, is to turn everything to red fire, hence the title: "Burn it All Down".

I found this puzzle pretty tricky, but after figuring out a few moves I think I can now solve any random 3x3 tile puzzles in less than a minute. Here's what I figured out...

Easy Case

It's clear that if you get a homogenous tile grid (even if it's not red), victory is straight-forward. Clicking the middle will change the color of all the tiles until you get to the color you want (red).

Note that it might take either one (in the case of starting with green) or two clicks (for blue) to get a grid full of red. This maybe-one-click maybe-two-click behavior sometimes appears in the steps below and is noted by a (x2?) symbol.

So, the strategy is to make all the outside tiles the same color - any color - then finish up the middle tile last.

Tiles on the outside can either be edges or corners. Here is how to solve both types.

Edge Tiles

In this case, we need to change the incorrect edge tile.

We click (in any order):

  1. The incorrect tile, 2 times
  2. One non-middle tile adjacent to the incorrect tile, 1 time
    • In this case, the one right above the incorrect tile
  3. The other non-middle tile adjacent to the incorrect tile, 1 time
    • In this case, the one right below the incorrect tile

Notice that this move also changes the center tile. That's okay - we'll fix that at the end.

Corner Tiles

In this case, we need to change everything except the incorrect corner tile.

We click (in any order):

  1. The tile catty-corner to the bad tile, 2 times
    • In this case, the tile farthest from the bad tile, the bottom right (SE tile)
  2. One edge tile adjacent to the catty-corner tile
    • In this case, the tile above the catty-corner tile, the middle right (E tile)
  3. The other edge tile adjacent to the catty-corner tile
    • In this case, the tile to the left of the catty-corner tile, the middle bottom (S tile)
  4. Sometimes - (x2?). In this example, you have to do the steps two time: once to turn all the other squares blue, and a second time to turn them green to match the original corner.

Radial Symmetry

Once you've used the moves above to ensure that all the edges and corners are set, we can handle the middle. Unless you've already won. There's a 1 in 3 chance of automatic victory, so your odds aren't too bad!

Lets assume you haven't won and instead you have a pretty wreath with green on the outside and a pesky red tile in the middle.

We need to turn this into a checkerboard before we can solve this.

Click all the edge tiles (in any order):

  1. North tile
  2. East tile
  3. South tile
  4. West tile
  5. Sometimes - (x2?)
    • The first time you do these moves, it will either turn the game into a checkerboard OR a cross.
    • The second time you do these moves it will turn into whatever it didn't turn into the first time.
    • We want the checkerboard.

To solve a checkerboard, just click all the corner tiles:

  1. NW tile
  2. NE tile
  3. SE tile
  4. SW tile
  5. Sometimes - (x2?) Remember you may need to do this twice.

Huzzah! You win!

Impossible Puzzles

After experimenting with a few different tile heights and widths, it became pretty clear that not all puzzles are solvable. The most obvious example is a 1x2 or 2x1 grid in which each square starts as a different color, but there are plenty of others:

I wrote a dynamic programming algorithm to determine solvability of individual puzzles (seems like a good interview question). It doesn't work well on large grids and it uses bloom filters so its results are probabilistic.

Estimated Puzzle Solvability

Here is a table showing my estimated solvability of different tile puzzles based in their heights and widths. A cell is YES only if all variations are solvable.

Height
Width
123
1YES--
2NONO-
3YESNOYES
4YESNOYES
5NONONO
6YESNO?
7YESNO?
8NONO?
9YESNO?
10YESNO?
11NONO?

If you want to try out some different combos yourself, just modify the width and height params in this url: https://burn-it-all-down.endlesswips.com/?width=3&height=3

Go Crazy!

(I have no idea if this is solvable or not, good luck!)


Comments
— or fill in your name below