2048 AI Strategy: What a Computer Player Looks For on the Board
A 2048 AI strategy has two parts. First, the program scores each board it could reach by a few things: how many squares are empty, how many merges are waiting, whether the larger tiles sit at the edge, and whether tile sizes rise or fall in steady order. Second, it looks a few moves ahead and averages over every random new tile, then picks the move with the best average. You cannot search like a computer, but you can run the same checks in your head before each slide.
To try those checks on a fresh kind of board, Evolved 2048 puts the 2048 puzzle on a cube you turn like a Rubik's cube, so you slide the front face and twist rows to bring tiles round from five other faces, free in your browser.
How a 2048 AI strategy scores a board
A computer player does not see the board as you do. It sees a list of numbers and a short list of legal moves. For each move, it works out the board that move would leave. It gives that board a score with a formula. Then it compares the scores.
Wikipedia's article on 2048 has a section on its use in artificial intelligence research. It says the game's mathematical nature made it of interest to AI researchers, and it lists what a board-scoring formula, called an evaluation function, can favour:
- empty squares;
- a large number of merge possibilities;
- larger tiles placed at the edge;
- monotonicity, meaning tile sizes that rise or fall steadily along a line, especially for the larger tiles.
Each item is something a strong human player also watches. The program simply counts them on every board, every move, without getting tired or hopeful.
Empty squares come first
Every empty square is a place for the next tile to land and room for tiles to slide. When the space runs out, the other three checks stop mattering, because no move is left to use them.
On a cube, a program would have to count space with care. In Evolved 2048, every slide or twist adds a 2 or a 4 on the front face when it has room. In Evolved mode, slides work on the front face only, as in 2048. So nine squares do most of the work, although the cube has 54.
A scripted test game shows why that matters. Playing slides only, the front face was full at move 46 with the other five faces still empty. Turning to an empty face and sliding moved nothing. The space was there, but out of reach.
Twists are how you reach it. A twist turns a row or column a quarter and carries its tiles to the next face, and the game says a twist needs one empty square for its new tile. The game ends when all 54 squares are full and no face has two equal tiles side by side. Its own advice, in the No moves left box, reads like an evaluation rule: "Next time, keep room on one face so a twist can still bring tiles round to their match." For more on this habit, see why free space beats a high tile.
Merge possibilities: counting pairs you can take later
A merge possibility is two equal tiles that could join on a later move. A board with three waiting pairs has more future than a board with none, even if the score is the same today.
A program is only as good as its model of the rules, so it has to count merges the way the game makes them. In an Evolved 2048 merge test, a left slide turned the row 2 2 4 into 4 4, not 8, because a tile made in a merge does not merge again in the same slide. A right slide turned 2 2 2 into an empty square, then 2, then 4, because the pair nearest the wall you slide towards merges first. Count merges that never happen, and the formula lies to you.
If you pick Edge mode, a slide towards an edge also merges the tile at that edge with an equal tile just over it, on the next face. That adds pairs across the cube's edges to the count.
Big tiles at the edge, in steady order
The last two checks work together. Keep the larger tiles at the edge, and keep their sizes in steady order along a line, so each tile sits next to the one it will grow into. Human players call one form of this the snake: the biggest tile in a corner, the row running down from it, the next row running back.
Here is a worked example you can follow, from a test on the Evolved 2048 front face. The board started like this:
- Top row: 64 32 16
- Middle row: 4 8 16
- Bottom row: empty
The top row is already in steady order, and its 64 is in the corner. An up slide merged the two 16s into a 32 at the top right: Score 32. A left slide merged the two 32s into a 64, next to the other 64: Score 96. One more left slide merged the 64s into a 128 in the top left corner, and two 2s on the bottom row into a 4: Score 228 after three moves. Steady order turned three slides into one long chain. The snake strategy post goes further.
Which corner, then? An older corner test ran the same start once per corner with a mirrored key order. With one seed the bottom left did best; with another seed, the top left. Each was a single game, so neither proves a corner. The habit of staying with one corner matters more than which one.
Looking ahead past the random tile
Scoring one move ahead is not enough, because the new tile can spoil a board that looked fine. Wikipedia says 2048 AI strategy uses expectiminimax search up to a certain depth, plus tables to avoid working out the same board twice. Wikipedia's expectiminimax article explains the key idea: besides the player's own choices, the search tree has chance nodes, and a chance node takes a weighted average of what follows, each weight being the chance of that outcome.

In 2048, the chance is the new tile. In Evolved 2048, it goes on a randomly picked empty square of the front face, or any empty square once the front is full, and it is a 2 when a random number is under 0.9, otherwise a 4. When the game's own random number code was run for 10,000 new tiles, 1,001 were 4s.
So picture a front face with three empty squares after your slide. The chance layer has six outcomes: a 2 or a 4 on each square. Each 2 weighs 0.9 divided by 3, or 0.30. Each 4 weighs 0.1 divided by 3, about 0.033. The program scores all six boards, averages them with those weights, and does the same for every other move. It asks which move does best across the likely tiles and the unlikely ones.
The cube makes the tree wider. You have four slides, and on a keyboard 1, 2 and 3 twist the top, middle and bottom row, 4, 5 and 6 the left, middle and right column, and Shift twists each the other way. Each twist counts as a move and adds a tile. Whole-cube turns are different: Shift and an arrow key turns the cube, and turning is free. To a program, a turn is only a new view, not a branch. Our three moves ahead post tries this kind of planning by hand.
What the best programs reach
Wikipedia reports that, as of 2025, a program using expectiminimax and pre-built tablebases, over 1,200 simulated games on the classic board, reached a 16384 tile in 99.9% of games, 32768 in 86.1% and 65536 in 8.4%, with a median score of about 820,000. That is far past 2048. It still does not reach 65536 every time, because the new tiles are random. The post on whether you can win 2048 every time looks at those numbers more closely.
Those numbers come from the classic 4 by 4 board. A cube of 54 squares has other rules for space and merges, so they say nothing about how far a cube game can go.
Five checks to run without a program
You cannot search several layers deep in your head. You can run the checks in order, fast. Before each slide or twist, ask:
- How many empty squares will the front face have after this move?
- How many equal pairs will be waiting, on the front and across its edges?
- Does my biggest tile stay at its edge or corner?
- Do the larger tiles still run in steady order away from it?
- Where could the new tile land, and is there one square where a 2 would hurt?
Take your time over each one: no undo was seen in Evolved 2048, so a slide cannot be taken back.
Frequently asked questions
Is there a perfect 2048 AI strategy?
No program wins every game to every tile, because new tiles land at random. Good scoring and deeper search raise the odds, as the results Wikipedia reports show.
What does a 2048 AI look for on the board?
Wikipedia lists empty squares, many merge possibilities, larger tiles at the edge, and tile sizes in steady order along a line, especially the larger ones.
What search do 2048 programs use?
Expectiminimax search to a set depth, which averages over the random new tiles, plus tables that skip boards already worked out and estimate endgame chances.
Does playing with AI-style checks count as cheating?
No. Counting empty squares and keeping big tiles in order in your head is simply playing well. In Evolved 2048, every ranked game is checked: the server replays its moves with the game's rules and works out the score itself.
Get started
Open the game, pick a mode, and try one check at a time. Play a game where you guard only empty squares, then one where you keep the big tiles in steady order from a corner, and see which keeps the front face open longer.
Play Evolved 2048: it is free and plays in your browser on a computer or a phone.
The 2048 puzzle on a Rubik's cube, and past 2048.
Visit evolved2048.vlvd.net↗


Comments
No comments yet.