Watch an AI Play 2048
Pick a strength and a speed, press Start, and watch the AI work through a game. You can pause at any move, step forward one move at a time, or take over the board and play it out yourself.
Press Start to watch the AI play.
Controls
How the AI chooses its moves
The AI uses expectimax search. For each of the four directions it looks ahead, assuming a new 2 or 4 appears in a random empty cell after every move, and averages the outcomes. It then picks the direction with the best average score.
To judge a board, it rewards empty cells, tiles arranged in a tidy descending order along a row or column, and neighbouring tiles that can merge. These are the same ideas covered in the strategy guide, applied by a program that can check many boards each second. The AI plays by the same rules as you and gets no hidden information about the next tile.
What each strength level reaches
The levels differ in how many moves ahead the AI looks. We ran each level through repeated games on the 4×4 board and recorded the largest tile it reached.
| Level | Looks ahead | What we saw |
|---|---|---|
| Casual | 1 move | Between 128 and 512 in 60 games. It never reached 2048. |
| Skilled | 2 moves | Reached 2048 or higher in 133 of 200 games. |
| Expert | 4 moves | Reached 2048 or higher in 19 of 20 games, and 4096 or higher in 17 of them. |
These are results from our own test runs, not an official benchmark, and the numbers will vary between runs because the tiles are random. For how the search works, read How a 2048 AI Works.
What to watch for
- The scoring rewards ordered rows, so the AI tends to keep its largest tile at one end of a row. The corner-strategy walkthrough explains why that helps.
- Because it looks ahead, the AI can pass up a merge that would break its chain. Our beginner mistakes article describes the same trap for human players.
- On 3×3, our three-move test AI reached 256 or higher in 51 of 100 games and 512 in 4. The 3×3 survival guide explains why the smallest board is so hard.
Frequently asked questions
How does the 2048 AI decide where to move?
It runs an expectimax search. For each possible move it looks a few moves ahead, averaging over where the next 2 or 4 tile might appear, and scores the resulting boards. A board scores higher with more empty cells, tiles in a tidy descending order, and merges waiting to happen.
Can the AI always win 2048?
No. The Casual level never reached 2048 in our test games, and Skilled reached it in about two games out of three. Even the strongest level depends on the random tiles it is dealt, so you will occasionally see it lose.
Can I take over from the AI?
Yes. Press Take over to copy the current board into a Free Play game and finish it yourself. It replaces your saved Free Play game, so the page asks before doing that if you have a game in progress.
Does the AI cheat?
No. It plays by the same rules as you. It sees the board but not the next random tile, so it can only estimate where a new tile will land.