Puzzle guide

Sliding Block Puzzle Strategy: How to Solve Unblock Puzzles Step by Step

By 8 min read

Unblock Metro level 22: a six by six board with colored trains blocking the red metro from the exit on the right
Level 22 of Unblock Metro. Two trains cross the metro's row; the shortest solution takes nine moves.

Key takeaways

  • Work backwards: find the blocker, then what blocks the blocker, until you reach a piece that can move now.
  • In 38 of 60 levels the best first move is a piece that is not in the way.
  • In 28 of 60 levels the key piece has to slide away from the exit at least once.
  • A piece three cells long can clear the exit row in only one place, so you know where it must go.

To solve a sliding block puzzle, work backwards from the exit. Find the piece that blocks the way, then the piece that blocks that piece, and keep going until you reach one that can move right now. That piece is your first move. In 38 of the 60 levels of our Unblock Metro, the best first move is a piece that is not even in the way.

What is a sliding block puzzle?

A sliding block puzzle, also called an unblock puzzle, is played on a small grid packed with long pieces. Each piece slides only along its own length: a horizontal piece moves left and right, a vertical piece moves up and down. Nothing can jump or turn. One special piece has to reach the exit at the edge of the board.

The best-known version is the board game Rush Hour, invented by Nob Yoshigahara in the 1970s: a six by six grid, cars two cells long, trucks three cells long. Our Unblock Metro uses the same grid with trains instead of cars. The red metro sits in the third row and the exit is at the right end of that row.

One slide of one piece counts as one move, however far the piece travels. That detail matters for the star rating, and we come back to it below.

What 60 solved levels show

We built Unblock Metro and its solver, which finds the shortest solution of a level by trying every position that can be reached. Running it over all 60 levels turns the usual advice into numbers.

  • The shortest solutions take 2 to 26 moves. Half of the levels need 13 moves or fewer.
  • Only one to four trains stand directly in the way, two on average. Yet the shortest solution needs about seven moves for each of them. The work is not moving the blockers. It is making room so that they can move.
  • In 38 of 60 levels no shortest solution starts with a blocker. The best first move is the metro itself or a train that is not in its way.
  • In 28 of 60 levels the metro has to slide backwards, away from the exit, at least once. Without that move those levels cannot be solved at all.
  • Only 31% of the possible first moves begin a shortest solution. Eleven levels have exactly one best first move.
  • On average two trains never need to move. In 49 of 60 levels at least one train stays where it is from start to finish.
Bar chart: shortest solution of each of the 60 Unblock Metro levels, rising from 2 moves to 26 moves, with 28 levels marked that need the metro to slide backwards
Moves in the shortest solution of each level. Yellow levels cannot be solved unless the metro slides backwards at some point.
Unblock Metro by level group
LevelsShortest solutionTrains on the boardTrains directly in the wayPositions that can be reached
1 to 152 to 6 moves5.51.72,238
16 to 307 to 13 moves7.72.04,792
31 to 4513 to 16 moves10.71.95,081
46 to 6016 to 26 moves10.92.27,416

Train counts are averages and leave out the metro. Positions are the middle value of each group. The largest level has 278,666 positions.

The strategy, step by step

1. Trace the exit row

Look only at the row of the key piece, from its nose to the exit. Every piece crossing that row is a blocker. There are rarely more than three. Name them and ignore the rest of the board for a moment.

2. Ask where each blocker can go

A blocker has to leave the exit row completely. For a piece two cells long there are usually two ways out, up or down. A piece three cells long is different. On a six-row board with the exit in the third row, a vertical piece of three clears the row in exactly one place: all the way at the bottom. If you see a long piece in the way, you already know where it must end up.

3. Follow the chain to a piece that can move

Now ask what stops that blocker from getting there. Usually it is another piece. Ask the same question about that one, and again, until you reach a piece that is free to slide. You have just read the solution backwards. Play it forwards.

4. Treat empty cells as your budget

The board never gains or loses space. Every slide moves the gap somewhere else. When a long blocker needs three free cells in a line, count the pieces sitting on those cells: each of them needs a parking place of its own before the blocker can pass.

5. Move the key piece back when another piece needs its cells

This is the move players resist. The key piece also takes up cells, and sometimes a vertical piece has to cross the exit row exactly where it sits. Almost half of our levels (28 of 60) cannot be solved without sliding the metro away from the exit first. If your chain of blockers ends at the key piece itself, back it up.

6. Slide the full distance in one move

A slide counts as one move whether the piece travels one cell or four. Two short slides of the same piece cost two moves. Decide where a piece has to end up and take it there in one go.

7. Solve first, then go for the stars

Every level of Unblock Metro shows the smallest possible number of moves. Matching it earns three stars, up to three extra moves still earn two. Solve the level once in any way. Then restart and play only the moves that mattered: pieces you moved and moved back were not part of the answer.

Worked example: level 13 in six moves

Diagram of Unblock Metro level 13 with lettered trains and its six-move solution: A left 2, D left 1, F up 4, B left 1, E down 3, A right 3
Level 13 of Unblock Metro with the trains lettered. A is the metro, the exit is on the right.

Only one train, E, stands between the metro (A) and the exit. Reading the chain backwards:

  1. E is three cells long, so it clears the exit row only at the bottom of its column.
  2. B sits in that column. B can leave it only by sliding left, and F is in the way.
  3. F has to leave B’s row. Moving it up two or three cells would park it in the exit row, so it has to go all the way to the top.
  4. Two things stop F on its way up: D, and the metro itself, which sits in F’s column.

Played forwards, that gives: A left 2, D left 1, F up 4, B left 1, E down 3, A right 3. Six moves, the first of which takes the metro away from the exit, and three of which move trains that were never in its way.

Try the method yourself: play Unblock Metro in your browser. All 60 levels are free and there is nothing to download.

How hard can sliding block puzzles get?

You can never ruin a sliding block puzzle. Every slide can be undone by sliding the piece back, so a level that was solvable at the start stays solvable. What changes is how far away the solution is.

On the classic six by six board, a complete computer search by Michael Fogleman found that the hardest position needs 51 moves. In his database of more than two million puzzles the most common length is 11 moves. Our hardest level needs 26. On larger boards the question whether a position can be solved at all is PSPACE-complete, a class of problems believed to be harder still than the ones behind Sudoku.

For a person the difficulty is not the number of positions. Even our largest level has only 278,666 of them, which a computer checks in a moment. The difficulty is that the helpful moves do not look helpful: they move a piece away from the exit, or move a piece that is not in the way.

How we measured

All numbers come from the 60 levels of the Unblock Metro on this site. A breadth-first search visited every reachable position of every level, which gives the true shortest solution. To test whether the metro has to move backwards, we ran the search again with that move forbidden. A train counts as directly in the way when it covers a cell between the metro and the exit at the start.

The same way of thinking, reading a jam backwards, also works for Seat Jam. For a puzzle where a wrong move can end the level, see our water sort tips, or browse all puzzle games.

Frequently asked questions

What is the goal of an unblock puzzle?

To slide the key piece to the exit at the edge of the board. Every other piece only moves along its own length, so you have to clear a path by sliding them out of the way in the right order.

Can a sliding block puzzle become unsolvable?

No. Every slide can be reversed by sliding the piece back, so a level that could be solved at the start can always still be solved. You can waste moves, but you cannot get stuck for good.

How do I get three stars in Unblock Metro?

Finish the level in the smallest possible number of moves, which is shown on screen as Min. Up to three extra moves earn two stars. One slide counts as one move, however far the train travels.

What is the hardest level of Unblock Metro?

Level 60. Its shortest solution takes 26 moves. Level 59 needs 25 and level 58 needs 22.

Does the hint show the best move?

Yes. The hint searches from your current position and shows the first move of a shortest solution.

Is Unblock Metro the same as Rush Hour?

It belongs to the same family of sliding block puzzles and uses the same six by six grid. The 60 levels and the metro theme are our own.

Why do I have to move the red metro backwards?

Because the metro takes up cells too. When a vertical train has to cross the exit row where the metro is sitting, the only way to let it through is to slide the metro out of that column first. In our game that happens in 28 of the 60 levels.

About the author. This guide was written by the team behind Yes This Game. We design, build and test our own browser games, so when a guide quotes numbers, they come from the game’s own code and can be reproduced.

Found a mistake or have a question? Tell us and we will fix the guide.