2048 AI

0
0

Join the numbers and get to the 2048 tile!

New Game

AI Player




This is a minimum pause time, and the AI might spend more time thinking than this value.

AI Strength



AI Strategy


The expectimax search algorithm, searching to a certain depth


The expectimax search algorithm, searching all options with a probability above a cutoff


The minimax search algorithm, which assumes that tiles are placed adversarially


Weak search algorithm that uses random trials to simulate tile placements


Good strategy that tests the next move by simulating many games from the following position


Weak strategy which always moves up or left


Weak strategy that tries to move left, otherwise up, then right, then left


Very weak strategy that picks random moves


Very weak strategy that moves left, then up, then right, then left


Temporal difference learning with n-tuple network based on this paper.
Note that this requires downloading and unzipping a 28MB model file. Random moves will be played while waiting for the download.

Heuristic


Strong heuristic based on tile values, with higher weights for tiles in the corner


Strong heuristic that penalizes rows/columns that aren't in sorted order


Decent heuristic which compares boards in lexicographical order, going along a wall with penalties for inversions


Decent heuristic which compares boards in lexicographical order, going along a wall


Decent heuristic that compares boards in lexicographical order, going along a wall with a gap


Decent heuristic, similar to Corner Building but with different weights


Weak heuristic which uses an approximation of the in-game score


Weak heuristic which counts number of empty tiles on board


How to play: Pick a strategy for the AI to use. You can also turn off the AI and use your arrow keys to move the tiles. Press R to restart.


Click here for page where you can edit the board to test the AI.


AI players written by Stanley Zhong. (Source code for AIs and website)
Game mechanics from the original 2048 game.