Math
Games

Sliding-block Puzzles

Ed Pegg Jr., December 13, 2004

The December issue of The Economist contains an article with a prominent question. Has an inventor found the hardest possible simple sliding-block puzzle? It goes on to describe the Quzzle puzzle, by Jim Lewis. The article finishes with "Mr Lewis claims that Quzzle, as he dubs his invention, is 'the world's hardest simple sliding-block puzzle.' Within the terms of his particular definition of 'simple,' he would seem to have succeeded."

The claim is wrong. Quzzle is not the world's hardest simple sliding-block puzzle, no matter how you define "hard."

Sometimes, hard means lot and lots of moves. Junk Kato has succinctly described a record setting series for the most moves required with n pieces. The basic underlying principle is
Edouard Lucas' Tower of Hanoi puzzle. Move the red piece to the bottom slot.

Often, "hard" maximizes complexity with a sparse number of pieces. Usually, the fewer the pieces, the better the puzzle. Two people at the forefront of making really hard sliding-block puzzles with just a few pieces are Oskar van Deventer and James Stephens. James started with Sliding-Block Puzzles. The two of them collaborated to create the ConSlide Puzzle and the Bulbous Blob Puzzle. Oskar even went so far as to make a prototype of the excellent Simplicity puzzle. If any sliding-block puzzle deserves the label "hardest simple puzzle," it might be this one.

Figure 2. Simplicity by James Stephens, prototyped by Oskar. Move the red piece to the upper corner.

Oskar's prototype for Bulbous Blob is a thing of beauty, both aesthetically and puzzlistically. I hope it gets sold in stores eventually. These pieces are the diominos and triominos from the set of rounded polyominos.

Figure 3. The Bulbous Blob puzzle by James Stephens and Oskar van Deventer.

For puzzles with a small number of pieces, a high number of moves, and difficult solutions, my own puzzles used to be record setters. F-penta and Centrifuge are very difficult 4 and 5 piece sliding-block puzzles, requiring 41 and 63 moves. While writing this column, I tried a tiny modification to Simplicity (which I will call Simplicity 2), and found it requires 68 moves. (Hopefully, someone will topple this new record for 4 piece puzzles.)

An old-style sliding-block puzzle fits into a 4×5 rectangle, has all pieces 1×1, 1×2, or 2×2, and has goal "move the large piece to position B." The most famous puzzle of this type is Dad's puzzle. For comparison purposes, Nick Baxter has put together a page of 4×5 puzzles. In Winning Ways, John Conway published the Century puzzle, which has long been the "hardest" old-style puzzle. Here's the solution:

Figure 5. Steps in the solution of John Conway's Century puzzle.

He was later bested by Junk Kato, with the 123-move puzzle Supercompo. Cut to last week. Gil Dogon, a software Engineer and part time puzzler/mathematician/hacker, was a "bit irked" by the claims in The Economist that Jim Lewis had created the "Hardest 4×5 sliding puzzle problem." He proceeded to find a 138 move puzzle which he calls Super-Century. Quzzle requires 84 moves.

Figure 6. Super-Century by Gil Dogon. Move piece A to the lower middle of the board.

Another old-style puzzle has goal "go from board position A to board position B." Conway's Century and a Half requires flipping the board position, and needs 150 moves. Junk Kato's HiFi requires swapping 2 pieces, and needs 200 moves. Gil Dogon's position above requires 229 moves to flip the board position.

If L-trominoes or other polyforms are tossed into the mix, greater complexities appear. Michael McKee has made very, very difficult puzzles with the pentominoes and a 9×9 board-- see Pentomino Mosaics. So -- just how difficult can sliding-block puzzles be?

In February 1964, Martin Gardner devoted his Mathematical Games column to sliding-block puzzles. He said: "These puzzles are very much in want of a theory. Short of trial and error, no-one knows how to determine if a given state is obtainable from another given state, and if it is obtainable, no-one knows how to find the minimum chain of moves for achieving the desired state."

Recently, Erik Demaine and Robert Hearn proved that sliding-block puzzles are PSPACE-complete. In their paper, you can see the AND-gates, OR-gates and other wiring necessary to build a sliding-block puzzle that emulates a computer. In fact, a puzzle made just with dominoes is PSPACE-complete. Since sliding-block puzzles are PSPACE-complete, "hardest" is meaningless. For any question a computer can answer with YES or NO, an equivalent sliding-block puzzle can be set up whose solvability depends on the answer.

What is the hardest sliding-block puzzle with n pieces, fitting within a board containing k squares? We don't know. For a related problem, Sokoban, Erich Friedman has compiled some results.

What is the most elegant sliding-block puzzle? There are two that I particularly like. Serhiy Grabarchuk's Sliding Digits is a twist on the Sam Loyd 15 puzzle. Just swap the positions of the 7 and 8. In Rectangular Jam, the pieces may be rotated around, if enough room exists. The size of the pieces is very delicately calculated, to produce a puzzle with much more complexity than is apparent at first glance. Rightangular Jam and Triangular Jam are similarly elegant.

Many good sliding-block puzzles were discovered this year. Worse, some of the nice puzzles were discovered by me, just bumbling around. Both of those are good signs that there are lots of elegant, undiscovered sliding-block puzzles, waiting for someone to careen into them.