Online 2048 Game
Merge matching tiles toward 2048 with repeatable seeded boards and one-move undo to practice a different route from the same opening.{{ hud.finish === 'open' ? 'Open-ended' : 'Target ' + hud.target }} · Target reached
{{ hud.feedback }}
Arrows / WASD · Swipe · U to undo
{{ textState }}
Run seed: {{ playSnapshot ? playSnapshot.seed : params.seed }}
With only sixteen squares, a 2048 board can become crowded even while its tiles are growing. The aim of the puzzle is to build a single 2048 tile by combining equal numbers on a 4 by 4 grid. Two 8 tiles become a 16, two 16 tiles become a 32, and the same doubling rule continues.
A slide moves the whole board in one direction, rather than moving one chosen tile. Tiles travel as far as the edge or another tile allows, and matching values combine when they meet along that direction. A newly merged tile cannot merge again during the same slide. There is no need to race a clock because the board advances by moves, not by waiting.
After a slide that changes the board, a new 2 or 4 appears in an empty square. Merging creates room, but that new tile immediately uses some of it.
- A slide without a merge uses up one empty square.
- A move with one merge ends with the same number of empty squares.
- Two or more merges in the same move leave more empty squares than before.
Those rules make the arrangement of the tiles important. A 16 between two 2 tiles prevents the 2s from meeting along that row, even though both matching tiles are visible. Earning points elsewhere does not necessarily remove that obstacle. A useful move leaves room for the next small tile and a way for equal values to meet.
Even a full board may still be playable. Equal tiles directly beside one another or directly above and below one another can merge. A diagonal match cannot. The board becomes blocked only when every square is occupied and no horizontal or vertical pair can merge.
How to Use This Tool:
This classic-inspired version lets you choose the goal before starting. The target and finish choice stay fixed during a run.
- Choose a Target tile of 128, 512, 2048 or 4096. The default is 2048 with Finish set to At the target tile. Choose Open-ended · Until blocked before starting if you want to play past the target. A finished run cannot be continued.
- Enter a Run seed of 1 to 96 characters, or keep 2048-practice, then select Start game. Leading and trailing spaces are removed. If the start button is disabled, replace the blank seed with a practice label. Two tiles appear on the board.
- Slide with the arrow keys or WASD, swipe within the board, or use the direction buttons. Click the board during play to restore keyboard focus, and press each direction separately rather than holding a key. If no tiles move, try another direction.
- Use Undo or press U to take back the latest board-changing move. Undo is available only during active play and cannot step back through older moves. Another board-changing move makes it available again.
- Select Pause to take a break, or press Escape or lowercase p while the board has keyboard focus. Leaving the browser window or switching tabs pauses play automatically. Select Resume or press Escape to continue. Restart starts the same opening while playing or paused.
- Select End run to stop early, or play until a finishing condition is reached. From the summary, use Replay same seed to retry the opening, New seed to start with a new seed and the same settings, or Change setup to choose another goal.
Interpreting Results:
Highest tile shows the largest tile currently on the board. Score records merge points, while Moves counts slides that change the board rather than every direction you attempt. A score of 2048 does not, by itself, mean that you have created a 2048 tile.
Use Run details to match the seed, setup and rules version when comparing attempts. Undo rolls back the score and move count, so these figures describe the route you kept rather than every action you tried. An open-ended run can continue beyond the point where a target-ending run stops; their final scores are not directly comparable.
Technical Details:
A directional slide resolves movement and merging before a new tile appears. Horizontal slides act within rows and vertical slides act within columns. Tiles keep their order along each line, so unequal values cannot pass through one another.
Rule Core
- Read each row or column from the edge toward which it is moving, closing the gaps between occupied squares.
- Combine neighboring equal values in that order. Each pair becomes one tile with twice the value, and each original tile can belong to only one pair. The new tile cannot merge again during this move.
- Pack the remaining tiles against the chosen edge. If neither positions nor values change anywhere on the board, do not count a move, award points or advance the next tile choice.
- For a changed board, add the merge points and count one move, then add one new tile in an empty square. Check the finishing conditions after that tile appears.
For a left slide, a row containing 2, empty, 2, 4 first closes to 2, 2, 4, empty. The pair of 2s then becomes a 4, leaving 4, 4, empty, empty. Those two 4s must wait for another move before they can combine.
With three matching tiles, the pair nearest the destination edge merges first. The rows below are written from left to right and stop before the new tile is added, which may happen in this row or elsewhere on the board.
| Row before | Slide | Row after merging | Points added |
|---|---|---|---|
| 2, 2, 2, empty | Left | 4, 2, empty, empty | 4 |
| 2, 2, 2, empty | Right | empty, empty, 2, 4 | 4 |
| 2, 2, 2, 2 | Left | 4, 4, empty, empty | 8 |
Formula Core
The score increases by the value of every tile created by a merge, summed across all four rows or columns.
Here, S is Score in points, m is the number of merged pairs in the move, and vi is the value of either tile in pair i before merging. The score starts at zero and uses whole-number points without rounding. A move with no merges adds zero points.
A move that merges two 4 tiles and two 8 tiles creates an 8 and a 16, adding 24 points. Merging preserves the sum of the tile values on the board even while it earns points. Starting tiles and newly appearing tiles earn nothing, so adding up the board is not a way to recover the score.
Seeded tile choices
Each new tile uses a seeded random choice for its value and another for its position among the currently empty squares. Empty squares receive equal placement weight. The value rule assigns a 90% weight to 2 and a 10% weight to 4. Both starting tiles use the same rule. These weights do not require nine 2s and one 4 in every group of ten tiles.
The same seed, settings, rules version and ordered play reproduce the same boards. A seed does not prescribe fixed board coordinates regardless of your moves. Changing direction can change which squares are empty, so the next tile can land somewhere different even with the same seed.
Undo also restores the next tile choice. Repeating the same move after undo produces the same tile in the same square, rather than giving another chance at a favorable spawn. Pausing does not change the board or the next tile choice.
Finishing conditions
After each board-changing move and its new tile, the following conditions are checked in order. The first applicable condition determines the result.
- Target reached! ends a target-ending run when the highest tile is at least the selected target. In open-ended play, reaching the target is only a milestone, so this stopping condition is skipped.
- No moves left ends a run when all sixteen squares are occupied and no equal tiles are adjacent horizontally or vertically.
- Move limit reached ends a run at 100,000 counted moves if neither earlier condition has ended it. This limit also applies to open-ended play.
Choosing End run while playing or paused produces Run finished instead. It records a voluntary stop, not a target win or a blocked board.
FAQ:
Will my board and score be saved when I leave?
No. The current board, score and undo history are not saved across a reload or after closing the page. Keeping the seed and setup lets you start the opening again, not resume a partly played board. Scores and seeded game outcomes are for puzzle practice and have no monetary value.
Is my run seed private?
A custom seed and changed setup choices appear in the page address, so use a non-sensitive practice label rather than a password or personal information. Tile movement, spawning and scoring happen in your browser, but that does not make a seed in the address confidential.
References:
- Original 2048 movement, merging and scoring rules, Gabriele Cirulli.