All AI games
🔢
MCTS

2048 AI — Monte Carlo Tree Search

How Monte Carlo Tree Search plays 2048 with simulations per move, scoring each direction live.

Play the game

How the AI works

2048 is played with Monte Carlo Tree Search (MCTS) — search, not a trained network. Before each move it runs ~80 simulations and keeps the move that leads to the best average outcome.

The four steps

  • Selection: walk the tree toward promising moves.
  • Expansion: add a new board state.
  • Simulation: play random/heuristic moves to the end.
  • Backpropagation: push the result back up the tree.

Why it suits 2048

2048 has random tile spawns, so a planning method that samples many possible futures handles the uncertainty better than a single greedy rule.

What you see on screen

The live bar chart shows the estimated score for each of the four moves, so you can watch the search prefer one direction over the others.

Need an AI engineer or data scientist?

I build custom ML models, AI agents, computer vision, and automation — from idea to production.