Sliding block puzzle

Sliding block puzzle online

Slide the wooden blocks aside and get the big red one out. 14 original levels on 4×4, 4×5, 5×4 boards, from a 3-move warm-up to 97 moves, every one solved by computer.

Sliding block puzzle — Two-step start

Moves 0 · Fewest 3

Two-step start

Drag a block with your finger (it can turn corners), or tap a block and then an arrow. Get the big block to the exit.

How to play

  1. Spot the big block and the exit. Every level has one red 2×2 block and a green Exit tab on the wooden frame. The exit can be on the bottom or the right side, so look before you move.
  2. Slide blocks into empty squares. Drag a block with a finger or mouse. It slides along the grid, may turn a corner in the same drag, and stops when something is in the way. Blocks never rotate or jump.
  3. Use tap controls if you prefer. Tap a block, then an arrow button, or tap an empty square it can reach. Arrow keys work on a keyboard.
  4. Free the big block. The level is solved when the red block reaches the exit opening. Fewer moves is better: moving the same block again straight away is still one move.
  5. Undo, reset, hint. Undo steps back, Reset starts the level again, and Hint plays the next move of a shortest solution from where you are.

Kinds of sliding puzzles

“Sliding puzzle” covers a few different games. Knowing which one you are playing changes how you think:

  • Exit puzzles (this page): blocks of different sizes, one target block, one exit. The challenge is making room. The best-known 4×5 version is klotski, called 华容道 in Chinese.
  • Number sliding puzzles: equal square tiles with numbers, such as the 15 puzzle, where the goal is to put them in order. That is a sorting problem rather than a traffic problem.
  • Picture sliding puzzles: the same idea as numbers, but the tiles form an image.
  • Packing puzzles are not sliding puzzles at all: you lift pieces and fit them into a box, as in our wooden block packing puzzle.

Beginner techniques for sliding block puzzles

  • Plan the big block’s route first. Trace the path it must take to the exit, then list the blocks sitting on that path.
  • Create parking spots. Before you move a blocker, make sure there is an empty space it can go to, ideally in a corner away from the route.
  • Move small blocks in pairs. Two 1×1 blocks side by side behave like one 2×1 block, which can open a lane for a long block.
  • Look for ‘trains’. Often several blocks need to shuffle in a loop, each moving into the space the previous one left. Repeat the loop until the gap is where you want it.
  • Watch the exit side. On side-exit boards the big block must line up with the opening, so its row matters more than its column.
  • Undo is free. If a position looks worse than three moves ago, go back rather than pushing on.

What makes a sliding puzzle hard?

Our search reports two numbers for each level: the fewest moves, and how many different positions can be reached at all. You might expect a bigger position space to mean a harder puzzle, but the two are only loosely linked. Level 4 has the largest space here (81,462 positions) and needs 11 moves, while level 6 can reach only 260 positions yet needs 17.

What really makes a level hard is a narrow bottleneck: a stretch where only one or two moves make progress and everything else just shuffles blocks around. Few empty squares and long blocks lying across the target’s path create those bottlenecks. That is why the later levels have only two empty squares.

All levels

All 14 levels are original and were picked from our breadth-first search so that the fewest-moves count rises steadily. “Fewest moves” counts one block moved any distance as one move; the next column shows the same puzzle counted by straight slides and by squares.

LevelStartNameBoardFewest moves
1
Two-step startoriginal4×4exit bottom3
2
Corner shuffleoriginal4×4exit bottom8
3
Off to one sideoriginal4×4exit bottom9
4
Roomy boxoriginal4×5exit bottom11
5
Side doororiginal5×4exit right12
6
Wide shelforiginal5×4exit right17
7
Planks and pegsoriginal4×5exit bottom18
8
Left-hand gateoriginal4×5exit bottom26
9
Low side doororiginal5×4exit bottom28
10
Stacked planksoriginal4×5exit bottom34
11
High side doororiginal5×4exit right38
12
Corner gateoriginal4×5exit bottom43
13
Final squeezeoriginal4×5exit bottom89
14
Long corridororiginal5×4exit right97

More block puzzles

Finished every level? Take on the 4×5 classic in klotski and check your route against the shortest klotski solution. For a different kind of thinking, read our block puzzle tips and tricks and try the tetromino puzzle or the wood block puzzle.

FAQ

What is a sliding block puzzle?

A puzzle where flat blocks slide around a tray without being lifted. In this kind, one special block must reach an exit. Other sliding puzzles ask you to sort numbered tiles or rebuild a picture.

How are these levels different from klotski?

Classic klotski always uses a 4×5 tray with the exit at the bottom middle. These 14 levels use 4×4, 4×5, 5×4 trays, different mixes of blocks and exits on bottom and right edges, and they start much easier. When you want the classic challenge, play klotski.

Is every level solvable, and how do you know the fewest moves?

Yes. Each level was generated by our own breadth-first search, which explores positions in order of distance, so the first solution it meets is a shortest one. The table lists that number in three counting styles.

Why do the move counts in the table differ?

Because there are three common ways to count. Level 14 needs 97 moves if one block moved any distance is one move, 109 if each straight slide counts, and 137 if every square counts. The game counts the first way.

Can I play on a phone?

Yes. Blocks are big enough to drag with a finger on a phone, and the tap-then-arrow controls help with precise moves. Progress and best scores are saved on your device.

Is it free?

Yes, completely free in the browser with no download or account.