Artificial Intelligence has crushed all human records in 2048. Here’s how the AI pulled it off.

By now, we’ve all heard of the addictive tile-mashing game called 2048. Last week, I picked up 2048 for the first time and — true to my nature — I started designing an AI to beat the game for me the following day. It didn’t take me long to find out that there’s already some pretty good AIs out there, so I picked up the best 2048 AI I could find and fired several instances of it to see what it could do. Much to my surprise, it not only beat 2048… it crushed every human record in 2048 that I could find.

Below is a video of the first 20 seconds of the AI hacking away at the game, mashing and merging tiles at superhuman speeds that we only wish we could match.

Like a multi-armed genius, the AI played 1,000 games of 2048 simultaneously without a hitch. Some games ended in a few minutes due to a series of unfortunate random tile spawns, while others nearly lasted 4 hours and reached scores previously thought impossible.


The worst instance achieved a score of 35,600, but even that instance managed to build the 2,048 tile and beat the game. Most instances ended with a score around 390,000 and a 16,384 tile, but the best instance built a 32,768 tile and stayed alive long enough to reach a score of 839,732.

As far as I know, this is the highest score achieved in 2048 without undos.


Perhaps even more impressive is how consistently the AI beats 2048. The AI reached the 2,048 tile — and even the 4,096 tile — in all 1,000 games, and reached the 16,384 tile in a large majority of them. In 1/3 of the games, the AI astonishingly reached the 32,768 tile, though it wasn’t able to make it much further past that. (Though it’s theoretically possible, if you’re lucky.)


For the rest of this post, I’ll be looking at the game where the AI reached the high score of 839,732. In that instance, the AI beat the game in only 973 moves, which is about average for the AI.

What’s especially curious about the AI’s progression is that it tends to reach tile X in about (X / 2) moves. For example, the AI reached the 16,384 tile in about 8,000 moves. At that rate, the AI would theoretically reach the 131,072 tile (the theoretically largest tile) in about 65,500 moves — roughly 2x the number of moves it ended up lasting for — if the random tile spawns played out in its favor.

The AI’s 2048 strategy

To get a better understanding of how the AI managed to rack up such a high score, I analyzed its playing strategy on its highest-scoring game. Below, I’ll outline 4 useful playing tips that the AI adopted to beat 2048. Some of these tips are fairly well-known — and were even coded into the AI as heuristics — but I figured it’s good to cover the bases.

Following these tips will undoubtedly help you improve your game and — hopefully — beat 2048. Ultimately, however, your survival toward the end of the game relies heavily on the random tile spawns working out in your favor; one poorly placed tile can spell the doom of your game.

Tip #1: Keep your highest-value tile in one corner for the whole game

One of the earliest strategies that players discovered for beating 2048 was to keep your highest-value tile in one of the corners for the entire game and slowly build it up. Some writers even called this a major design flaw of 2048 because it tends to make the game (relatively) easy to beat.


It’s no surprise, then, that the AI took advantage of this design flaw to beat 2048. In this game, the AI happened to choose the upper left corner, but all corners are equally viable. Pick one corner and stick to it.

Tip #2: Keep your highest-value tiles lined up

Another early strategy that 2048 players adopted was to maintain a row of monotonically increasing tiles as you build your main tile. I took a screenshot from my video above to demonstrate:


Notice how the tiles are nicely lined up? The 64 is right next to the 32; the 32 is right next to the 16; and the 16 is right next to (what is about to become) the 8. When that line of 4s is combined into a 16, this configuration allows you to quickly compress the entire row into your next-highest tile and start again.


Unsurprisingly, the AI adopted this strategy as well. The AI chose the top row as its primary row and kept 2nd-highest-value tile on the board was consistently right next its highest-value tile…


… and kept the 3rd-highest-value tile right next to the 2nd-highest-value tile in the top row. And so on. You’ll also notice that the AI often had the 3rd-highest-value tile just under the highest-value tile as well, which I’m still trying to understand. Any thoughts?

Tip #3: Keep the squares occupied

Above, I mentioned that unfortunate random tile spawns can often spell the end of your game. One of the more interesting strategies that the AI seemed to adopt was to keep most of the squares occupied to reduce randomness and control where the tiles spawn.


For most of the game, the AI maintained 12-15 (out of 16) tiles on the board and avoided merging too many tiles at once. While risky, this strategy ensures that tiles will spawn where you want them on the board.


In this game, the AI kept the bottom-right corner of the board open so the low-value tiles would spawn around there, which it would then merge with nearby low-value tiles and move up the chain.

If you choose a different corner, make sure to use the diagonally opposite corner as your “spawning ground.”

Tip #4: Maximize the number of possible merges on the board

One of the mistakes that newer 2048 players tend to make is to try to merge everything quickly and leave as many squares open as possible. While such a strategy makes intuitive sense — more open squares means you’re less likely to get gridlocked — focusing on immediately merging everything actually leads to shorter games.


In its best game, 2/3 of the moves the AI made resulted in 2+ possible tiles that could be merged. At the extreme, some moves resulted in 6+ possible tile merges, but of course not all those merges could be made at once.

Try playing a few games where you keep tiles lined up to merge — but don’t merge them until you have to — and see if you last longer than usual.

Have you beat this high score?

If you’ve beaten this high score in 2048 (with an AI or otherwise) without undos, please let me know in the comments below! I’d love to hear how this AI can be beaten.

Dr. Randy Olson is an AI Scientist at Absci using data science and deep learning to make medicines better and make better medicines.

Tagged with: , , ,
77 comments on “Artificial Intelligence has crushed all human records in 2048. Here’s how the AI pulled it off.
  1. Kyle says:

    I have found it useful to keep the 3rd highest tile in the second row first spot so I can keep the 3rd space on the top row a high value. Then when I get the 3rd highest (Row 2 Column 1) equal to the 2nd highest tile the 3rd space on the top row becomes the 2nd highest value without having to start over. Hope that makes sense. I never made it past 100k, so I cant really compare to that AI haha

  2. As someone with an interest in AI, but no practical knowledge yet on how to make one: Sweet! Now make it beat Super 2048!

  3. Peter Hofman says:

    I cheated, and used undos, kept me busy 2 days to get to my score of about 1.05M.

  4. Peter Hofman says:

    Undos are great when your touch screen acts as if you did something, but you didn’t intend to. That happens more often than real mistakes. I do follow a strategy though, which by looking at your screen shots could be partly the same as the AI one.
    Cool article though!

  5. Jesper de Jong says:

    I’ve also seen an article somewhere (unfortunately can’t find it anymore…) about a variant of 2048 where the computer would deliberately try to put new tiles in the worst possible place, instead of placing them randomly. It made the game MUCH harder to play. I wonder how much harder that would make it for the AI.

    • Randy Olson says:

      That sounds evil. I’m pretty sure no one would get very far in that game. ๐Ÿ™‚

    • acsmars says:

      Since that removes the randomness, the AI could be programmed to predicted that and quickly create the best possible game with those rules

      • dave says:

        But, if the computer knew where it was going, it would no longer be the worst possible square. 2048CEPTION!!!! lol

        • D. says:

          It’s just a minimizing function competing against a maximizing. It’s still the worst possible square. (Think about it like if the computer can choose a square worth [1 or 7], [2 or 6] or [3 or 4] points. The first computer will choose the [3 or 4] box because it knows the second computer is going to maximize out of the given choices.

          • doe says:

            It’s more complicated than that in a multi-round game because there is no possible way for either player to have enough computational power to know the true value of placing a tile somewhere – they have to rely on heuristics. Knowing where your opponent is going to place their tiles is going to allow your program to “read forward” a lot more dramatically and so might in fact improve its performance.

            • D. says:

              Right. My point was that a “worst possible square” actually does exist, even if players know what the other will choose.

            • Juan says:

              I disagree. Computers are now fast enough and 2048 is simple enough that both would have enough computational power to “play” optimally.

    • brekko says:

      Steve Mould discusses this program in his videos on youtube.

    • 2048 Windows Girls says:

      That’s the problem not only for AI vs. human comparisons, but also for bet-like or competition-like games. My diploma project is 2048 Game Girls Choice For Windows Desktop that targeted to solve this problem as well as many others. My 2048 game is completely free and open source. It has boards 4×4, 8×8, 16×16 and many useful benefits. Windows 10 ready.

    • Cedric Mamo says:

      As it is, the game is one player versus a random element. One player is trying to maximize his score against rolls of the die, so to speak.

      In the more difficult version, the tile spawn isn’t random. It’s intentionally trying to mess you up. So it’s one player against another player, not a roll of the die. You have one player trying to maximize his score, and the opposing player trying to minimize it.

      The AI for the normal 2048 uses what’s called expectimax optimization, for this type of game. Where one player is trying to maximize his score and the “other player” (the random tile spawn) is playing randomly.

      The AI for the other more difficult 2048 variant would use what’s called minimax optimization where one player is trying to maximize the score, and the other is trying to minimize it.

      Now here’s the thing: both methods work in a similar way. They both look a certain number of moves ahead, look at the board at those positions and picks the best one. In the case of expectimax, the program computes the probability of arriving at that board position, because all random tile spawns are equally likely. However, in the other variant, not all tile spawns are equally likely. Ones which turn out bad for you are more likely than ones which result in a good position for you. That means that the program can try to predict where the opponent will spawn the tile (this prediction is impossible in normal 2048 because all tile spawns are equally likely and are random). The minimax algorithm can take this into account and in some cases deduce that certain moves are worse than others without having to even look at them. This type of optimization of minimax is called alpha-beta pruning. The program still gets the exact same result as minimax, but minimax with alpha-beta pruning looks at significantly less moves than the plain minimax. Meanwhile, again, expectimax has to look at all possible moves ll the time.

      So, while I haven’t tried it, I’d hazard a guess that the harder variant of 2048 would actually be easier for a computer, not harder. Because since it has to examine significantly less board positions, it can look more moves ahead as well, i.e. “see” further into the future of the game.

  6. @Aqeel_AT says:

    For those who’s interested: this is what the ultimate game would look like. (I didn’t calculate the score but I guess it would be 8 digits.

    • Jonas Poffyn says:

      Interesting, you think you will get a 5th column at some point? xD

    • knowbodies says:

      This is wrong as its a 4×4 grid not a 5×4 grid. The highest possible tile is 131,072. It’s unlikely anyone can get it without undo, but it’s theoretically possible.

      • frobnicator says:

        Yup, 131072 is the highest possible.

        The game occasionally throws a 4 rather than 2 for the tile. If your board was optimally filled when you are at 65536, and the numbers are all lined up sequentially, and the final space is filled with a 4 rather than a 2 (65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 4) it collapses to 131072.

        You cannot go higher on the 16-box grid. I’ve hit the 16K block a few times, but those stupid 4-drops tend to complicate things when you are in high numbers but with only one column of empty squares.

      • Maxi Gibeon says:

        Don’t know what you mean by 5×4 but ppl have done it

    • singingcowboy674 says:

      I have been playing an 8×8 board for over a month and it finally just told me “YOU WIN!” My final score was about 20 mil and I had a 1 mil tile. I’ll upload it so you can see it.

  7. Marlon says:

    Now try it with Threes!, the original game that 2048 copied!

  8. Oliambert says:

    I wonder how it would perform in the quantum version of 2048 ( and if it would find the same glitch as I did. My score was kinda insane, and I only stopped because I was bored.

    • Maxi Gibeon says:

      It’s infinite, everyone knows that glitch, found it in year 9(English school system) and wowed all those idiots.

  9. frobnicator says:

    I followed the same pattern when I was addicted to the game, and could regularly get 4096 and occasional 8192 without undos, a few times getting 16K up in the corner. Highest in upper left, then snaking through down the leftmost column, up the second column, and back down the third. One key feature is you need to keep the rows filled so they don’t create holes. Sadly the stupid game occasionally throws in a 4 rather than a 2 that messes up the process.

  10. Jerry Mcdurmott says:

    The real talent: Whoever wrote that algorithm

    • Chris Mannering says:

      Yes and that’s a point with its own point because algorithmic intelligence is much more what occupied what is now the AI seat, before AI showed up.
      Algorithmic intelligence is an invariant initial conditions and that’s exactly what AI has to be not, to be AI

  11. George van den Driessche says:

    “Whatโ€™s especially curious about the AIโ€™s progression is that it tends to reach tile X in about (X / 2) moves.”

    Isn’t this necessarily the case, because every move a new tile appears and the tile adds 2 (or occasionally 4) to the total score on the board, which otherwise remains unchanged?

  12. jasonlankow says:

    I read this after your marriage vs. divorce post, and at first glance I read this headline as a hypothetical news article from the year 2048, when AI will wipe out all recorded human history.

  13. Mark Hilko says:

    It’s generally accepted to hire a smart writer via Internet. Everything you need you can find in uk essay writing services review, don’t hesitate to check it.

  14. Pierre says:

    Very interesting. The score distribution seems to have two modes. Is that because the 500,000 score corresponds to the 32,768 threshold you need some luck to pass ? We can almost spot two other modes in the distribution, do they correspond to other power of 2 thresholds ?

    • Juan says:

      In a way, yes. Luck becomes a problem as there are more tiles on the board and that happens just before the 32,768 is created, and the 65,536 is almost created

  15. 2048 says:

    I’ll assume your AI has some way to calculate a score for a configuration and then checks a certain depth tree, and that finding the score function was the hardest part, so I’ll make some suggestions about that.

    1. Putting the second highest weight tile in a second corner (not diagonal to the one where the highest weight is), is almost as good as putting it directly near the highest weight. And its definitely better than putting it in distance 2.

    2. I find it quite beneficial to put a low tile (2 or 4) in the second corner, in certain parts of the game, say, when constructing 2048-equivalent tiles. It protects again “slippage” of the highest weight tile in the second row.

    (and I cannot beat your AI: my best is 16384+8192).

  16. NaBUru38 says:

    I’ve just done a 79,456 score, featuring a 4096, 2048, 1024, 512 and double 128. I had it pretty clean until the last few moves. I’ve never used undos.

    The don’t merge strategy sounds interesting. The thing is that I play very fast, so I often make mistakes. I try to never press key up, but sometimes I block all rows and get stuck.

  17. DJ Toomey says:

    my high is 60732 with out any undos.

  18. Alan Martin says:

    This is interesting. I have played a phone version of the game called TileUp where I can almost reach your AI’s median. There are no take backs and equal spawning of 2s and 4s, which I think makes a difference. I think that for analysis of what AI does well, you have to look at critical hurdles when the board is full of large numbers or to put another way, just before you make a big tile. Here the probability of failure is highest. Also it is interesting to understand how it avoids a 2×4 or 3×4 lockout or a tesselation of alternate 2s and 4s at the critical stages. Maybe understanding what it does (or ‘thinks’) at these ‘hurdles’ can help improve the AI.

  19. justraley says:

    This will be my new personal high score (with undo)

  20. Aimee Zemanek says:

    18 months without losing or starting over

  21. Roger Rodriguez says:

    This is my hi score

  22. Trenton Hulsey-Belt says:

    My High score is 1,152,280 so far i’m still going and i have the 65,536 tile as of this point.

  23. Blythe Caracciolo says:

    I have a131072 tile with a 32768 tile. My score is 2547272. I don’t recall using the undo but I’ve also been playing the same game for 4 months.

  24. Tamara Wanner says:

    I just finished my second round with a score of 797,176; highest tile is 32,768. I did not use undo in the three weeks it took. My strategy for this round was to “chase” the highest pair on the board, whether that was 2 512’s or 2 16’s. I ignored all other tiles and let them take care of themselves. I’m interested in trying the AI’s strategy…

  25. Felix says:

    I love love these AIs, but it saddens me that none of them are better than this, not to say that they aren’t impressive mind you, but at the risk of flattering myself, I’ve been very close to hitting the 32k tile a number of times, though of course not as quickly or often. I am human after all, and during some 15k moves or more, you’re bound to make mistakes. And I’m convinced that I will succeed.
    I will say this however. Once I’ve hit that 32k, I will likely never play the game again, because there’s no chance in hell that I will be able to improve upon it.
    But an AI might. Sure there will be good and bad games, there is after all a random element, but still, as far as I know, no AI as of yet, have reached the next tile up, even after playing thousands or perhaps even millions of games, and that is disappointing.

  26. David Brown says:

    I currently have the 32768 tile and score of 456,700 and counting….
    I’ve use 13 undos though.

  27. Emenike Mekese says:

    I just hit my first 32,768 and am so thrilled. Repping with the AIs

  28. Gaurav Mehta says:

    I have a better score in this i have made 65536, below i am attachting the screen shot of the same

  29. RedFan2013 says:

    I am on a 8×8 grid, but I currently have a 65,536 tile with a score of over 1.5 million.

  30. Brian Galebach says:

    The AI putting the 3rd-highest tile below the highest tile is consistent with the “corner” strategy, rather than the “by-rows” strategy that my study found is superior in the 3×3 variant of the game.

  31. A.A.Skie says:

    On the 6×6 board I have a highscore of 1,456,500 so far and counting. Ive gotten the the 65,536 tile. Without undos.

  32. Britney Pedroza says:

    I am currently at just under 1.7 million with a 65536 tile

  33. Joe Beans says:

    The third(highest) number is kept under the corner number so it can be used with the third(highest) number on the top row. I bet, if you monitor that number you will see that it’s used to complete the top row.

    I hope that makes sense.

  34. singingcowboy674 says:

    I have been playing manually a 8×8 square and it’s almost infinite. After playing off an on during the day about a month or better, I finally met an end to the game (WAY after the 2048) and I was quite perturbed actually. The reason so is that I was no where NEAR as high as a tile as I knew I could accomplish if it alllowed me to continue. I hope my high score is logged as my final score after the game cut me off with a “YOU WIN!” was 20,615,260 and my largest tile was 1,048,576 and I had LITERALLY half a board free with a lot of matches waiting to be moved into.

    This is for postarity and history!

  35. Kris says:

    I have the high tile of 32,768 and a score of 555,432 and still going

    • Kris says:

      I will keep my profile picture updated with the score if I get close or get a new number

  36. Kris says:

    I just just the new number of 65536 with a score of 982172. Just changer my profile picture to my score

    • Maxi Gibeon says:

      Yeah my highest is 1.7mil, but I got so lucky with some of the 4s that spawned, then my mate screwed it up like a twat

  37. WR says:

    290024. no cheat mode. took about 2.5 hours.

  38. Maxi Gibeon says:

    Sotry mate, I’m getting up to 65536 minimum on most of my games, yeah it takes weeks but if you play now and then. It’s not difficult once you get the gist of it, there is one strategy I use. Highests in corner, 2nd 3rd and 4th down the same side, then use the block adjacent to the 4th highest to ‘grind’ up another ‘4th’ and merge. Repeat. Eventually you’ll have to ‘zigzag’ your way down the game but the highest possible score that any human has achieved is 3.8 million. With a 131072 tile. Your AIs a bit shit ngl.