Jogo de lógica · Grátis

QUEBRA15

Ordene as peças deslizantes de 1 a 15 no menor número de movimentos.

Movimentos
0
Recorde
—
Organize as peças de 1 a 15.

Free online 15 Puzzle

The 15 Puzzle is the classic sliding-tile game: fifteen numbers, one empty space and the goal of putting everything in order from 1 to 15. Play it free in your browser, with no clock and no rush. It looks like a matter of luck and it is a matter of method — and, as a bonus, it is one of the few puzzles where mathematics can tell you, before your first move, that a solution exists. This guide lays out the layer method with the exact moves.

History

The game is credited to Noyes Chapman, a postmaster in Canastota, New York, who is said to have shown it to friends around 1874. In 1880 it became a craze in the United States and Europe. Sam Loyd, a famous puzzle maker, claimed to have invented it, which researchers later disproved, and he became linked to the impossible "14-15" challenge, supposedly worth a $1,000 prize according to the story he himself told.

The mathematics had arrived before the craze, though: in 1879 W. W. Johnson and W. E. Story proved that half of all arrangements can never be reached by sliding.

How to play

The 4×4 grid holds tiles 1 to 15 and one empty cell. Click or tap a tile next to the gap — above, below, left or right — and it slides in. On a keyboard, the arrow keys slide a tile in the direction of the arrow: the left arrow slides the tile on the right of the gap to the left. Each tile you move adds 1 to the Moves counter. When everything is in reading order, with 1 in the top-left corner and the gap in the bottom-right, the game announces the win.

Your best score is the fewest moves you have ever needed; it is saved in the browser and only changes when you win in fewer. There is no timer and no move limit: the counter is the only scoreboard.

Rules

Strategies

Why every game is solvable

There are 16! possible arrangements (about 20.9 trillion), but only half of them, 10.46 trillion, can be reached by sliding; the other half is impossible. This version avoids the problem by scrambling with legal moves, so the board never leaves the reachable half.

The rule that separates the halves: count the inversions (pairs where a larger number comes before a smaller one in reading order, ignoring the gap) and add the gap's row counted from the bottom, 1 to 4. If the total is odd, the board is solvable. In the solved board, 0 + 1 = 1. Swap only the 14 and the 15 and you get 1 + 1 = 2: impossible, Sam Loyd's famous "14-15".

The layer method, step by step

Solve the board in layers, and never touch what is already done:

What the move counter hides

Every move takes the gap to a neighbouring cell, so the parity of the total number of moves is fixed for each board: it equals the parity of the distance, in steps, between the gap and the finishing corner. If the gap starts in the top-left corner, 6 steps from its destination, every solution, short or long, has an even number of moves. That is why the smallest possible improvement on the same board is 2 moves.

There is also a ceiling: no board needs more than 80 moves from a perfect player, a value proved by computer in 2005. And a floor: the minimum is never less than the sum, tile by tile, of the cells each one still has to travel. In simulations of this game's own scramble, that sum averages about 28, below the roughly 37 of a uniform draw among solvable boards.

Common mistakes

Tips for beginners

Trivia

Mobile version

On a phone, tap the tile next to the empty cell to slide it. The board is about 350 px wide, with tiles 76 px on a side, big enough for precise taps. There is no dragging: each tap moves one tile and counts as 1 move. The arrow keys work on a computer; on a phone the control is the tap.

Frequently asked questions

What is the goal?

To put the tiles in order from 1 to 15 by sliding them through the single empty cell, ending with the gap in the bottom-right corner.

Does every game have a solution?

Yes. The game scrambles by making 220 legal moves from the solved board, so it never produces an impossible arrangement.

What is the best technique?

Solving in layers: the top row first, then the left column, then repeat on the smaller square that remains. Closing each row or column (3 and 4; 9 and 13) takes the corner trick described above.

Can I slide several tiles at once?

No. Each tap moves a single tile next to the gap and counts 1 move; shifting three tiles in a row costs three moves.

Why can't I fit the 4 in after the 3?

Because the 3 blocks the 4's path. Instead, put the 4 in the 3's cell and the 3 just below it, with the gap in the top-right corner; slide the 4 right and the 3 up.

Is the best score a time or a number of moves?

Moves: it is the fewest you have ever needed for a win. There is no timer, and the best score is saved in the browser.

Can I ask for a hint or undo a move?

No. The only help is a new game, which draws another scramble at any moment.

Can I play with just the keyboard?

Yes. The arrow keys slide a tile in the direction of the arrow (for example, the left arrow moves the tile on the right of the gap to the left) without scrolling the page. With Tab and Enter you can also pick and move a tile next to the gap, and focus follows the moved tile.

Do I need to install anything or sign up?

No. It runs straight in your browser, free and with no sign-up.

Similar games