# Ain't Gonna Stop Until The 25th Hour

2048 is a game by Gabriele Cirulli based on 1024 and similar to Threes. More than one person I know has likened it to a mind virus.

xkcd/1344

The game is played on a 4x4 grid, and each cell can either be empty or contain a tile with a power of two on it. The game starts with a few cells filled with some 2s and 4s.

Using the arrow keys, one can send all of the tiles as far in a given direction as possible. If two tiles with the same power of two would collide as a result of this movement then they combine into a single tile with the next higher power of two, and your score increases by this higher power. When you move any tiles, a new tile that contains a 2 is generated in a random empty cell with 90% probability and a 4 is generated with 10% probability. If it’s not clear what I’m talking about, you should simply play yourself.

The object of the game is to continue this procedure until you get the 2048 tile, but you can continue playing past 2048 to attain higher and higher scores. The game is lost when the board is full and no tiles may be combined.

The queue snaking from the 2048 tile to the left, up one row, and to the right to the 8 tile. My strategy is stuck, because no tiles can now be combined.

My strategy has been to move tiles down and to the right, never ever pressing up, so that the largest number is in the lower right-hand corner, and so the numbers decrease across the bottom. Once the bottom row is full, moving the tiles left and right will leave this row alone, locked in place. Then I move tiles down and to the left, so that the largest number of the row one from the bottom touches the smallest number of the bottom row. This generates a queue or snake that tends to ensure that you don’t get stuck with two tiles that could be combined far away from one another on the board.

An example of this strategy can be seen in the screenshot, which was taken in my highest scoring game (so far…).

After getting stuck the 2 in the bottom row disrupted the queue and quickly led to the end of the game.

The main fault of this strategy is that once in a while (as shown above) pressing down, left, and right will move no tiles at all. Then one must press up, get a small tile “stuck” underneath the high-value tiles, disrupting the queue and hampering your ability to combine tiles efficiently. If this happens, the strategy is bound to lose soon. The loss that followed the above situation is shown below.

Because the code for this game is available on GitHub under the MIT License it has spawned a bunch of fun and interesting variations. These include:

- 2048 3D, which is played on three side-by-side 3x3 grids.
- 2048 4D, which is played on four 2x2 grids laid out in a square.
- 8192, which asks the player to keep playing past 2048.
- 65536, which increases the board size to 5x5 and sets the target at 65536.
- 9007199254740992, which is played on an 8x8 grid, with the object being to get the 2^53 tile. Estimated time to complete with a move a second is between 15 and 286 million years. I played until 65536. You can also have the game play itself, making a random move at a specified interval.
- 16384 Hex, which is played on a hexagon, with 3 independent directions of motion. Estimated playing time to win is 4-5 hours. I was defeated with an 8192 tile on the board.
- 2048 Hard, which is designed to not place a new tile randomly but instead to give you the least help.
- 8402, where you put down the tiles with the intent of preventing an AI from getting 2048.
- 243, where you combine 3 tiles into one: 1+1+1 = 3, 3+3+3=9, etc.
- 2048-tetris, a mashup with the classic game of falling blocks.
- 2584, where you combine tiles whose values are consecutive Fibonacci numbers.
- 2048 Automatic Win, full of snark.
- DOGE2048, which is a joke version where instead of numbers you combine tiles with goofy doge-meme images.
- 2048 Numberwang, which is inspired by Numberwang, the maths quiz show that’s simply everyone.