< Projects

2048.ai

0
0

Join the numbers and get to the 2048 tile!

New game Activate

0

ms per move

Delay:

100

ms

Downloading Weights (--/-- MB)

Random Player This player simply chooses a random move, and takes it. You'll find that it's not a great strategy, but it's a good baseline to compare other players to. It will almost never win.

Monte Carlo This player uses the Monte Carlo Tree Search algorithm to choose the best move. It simulates many games from the current state, and chooses the move that leads to the highest average sum of tiles. It should win (achieve 2048) around 75% of the time.

N-Tuple Network This player uses an N-Tuple network, which is a primitive form of a neural network that has been shown to work well for 2048. It should win almost 100% of the time, and get the 16384 tile around 60% of the time.

Expectimax This player uses the Expectimax algorithm to search through all possible game states and choose the move with the highest likely score. An evaluation heuristic that awards points based on various factors, such as merge score, empty tiles, and monotonocity, is used to evaluate the game states. It should achieve the 32768 tile around 30% of the time, but it will be much slower than the other players.


The actual 2048 game is exactly the same as the original. The prediction engine only has access to the current board state. No information about the next random tile position or value is known.

Made with Rust 🦀 and WebAssembly. Source code available on GitHub.
Play the original 2048

© 2024 Nathaniel Thomas.