Fifteen (Simon Tatham's Puzzles)

Saved games stay in this browser only.

About the puzzle

Fifteen is the good old sliding block puzzle that swept through America and Europe as a craze in the 1870s and has been sold as a pocket toy ever since. A 4x4 frame holds fifteen numbered tiles and one empty space; the only thing you can do is slide a tile next to the space into it. It has been in Simon Tatham's collection since its early days, with a generator that always deals a position that can actually be solved.

Rules

  • A move slides a tile that is next to the empty space, horizontally or vertically, into the space.
  • The goal is the tiles in order, reading 1, 2, 3, 4 across the top row down to 13, 14, 15 and the empty space in the bottom right corner.

Half of all possible arrangements of the tiles can never be solved; the game only gives you positions from the solvable half.

Controls

Input Action
Left click in the row or column of the gap slide as many tiles as needed to move the gap there
Arrow keys slide the tile next to the gap in that direction
H make a suggested move (repeat to have it solved, though it may undo your work)
N / U / R new game / undo / redo

In Preferences you can make the arrow keys move the gap instead of the tile.

How to solve it

One row at a time. Put 1, 2, 3 and 4 in the top row first and then never touch it again. Do the same with the second row. The last two rows are where the puzzle gets interesting.

The last tile of a row is the tricky one. Placing 4 next to 3 directly usually knocks 3 out of place. The standard trick is to park 4 just below its target square, with 3 to its left, and then rotate the pair into place together: slide the gap round them so that 3 moves into the corner and 4 follows.

Finish with columns. When only two rows are left, solve them column by column from the left: put 9 and 13 in place together, then 10 and 14, using the same parking trick sideways. The final 2x3 block is solved by cycling the tiles round until 11, 12 and 15 fall into place.

Think in cycles. In a 2x2 or 2x3 block, sliding the gap round in a loop rotates every tile in it by one step. Most of the late game is choosing which loop to turn and how many times.

Sizes

The Type menu has the classic 4x4. Custom lets you choose any width and height, from a tiny 2x2 to large boards that are a real test of patience.

Playing here

Click Play to open the puzzle. The menu above the board has New game, Restart, Undo, Redo and Solve (which you can undo to keep going on your own), the Type menu with the sizes, and the Game menu, where you can type in a game ID or a random seed, download the current game as a file, load a saved file and change the preferences. Your game in progress is kept in this browser and comes back with its whole undo history the next time you open the page.

On a touch screen, tap a tile in the row or column of the gap to slide it.

Credits and licence

Fifteen is part of Simon Tatham's Portable Puzzle Collection, written by Simon Tatham with code contributed by several other authors, and distributed with its source code under the MIT licence. This page runs a WebAssembly build made by FredyGames from the author's official source snapshot, with no changes to the puzzle; the source and the build script are hosted with the game, and the licence text is linked from this page.