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.