Attic › Computer science › Monte Carlo tree search
Monte Carlo tree search finds good game moves through random playouts
Monte Carlo tree search (MCTS) is a search algorithm that helps a computer make decisions, especially in board games. It evaluates possible moves by playing thousands of fast, random games to the end and counting which starting moves win the most.
In a game like chess or Go, the computer represents all possible future moves as a game tree. The current board is at the top, and each branch going down is a legal move. Because a complex game has too many branches to check them all, older programs looked a few moves ahead and used a human-written evaluation function to score the board. For example, a chess function adds up the value of the remaining pieces.
For some games, such as Go, experts could not write a good evaluation function because it is too hard to measure who is winning in the middle of a game. However, it is always easy to see who won at the very end.
In 2006, computer scientist Rémi Coulom described applying the Monte Carlo method to game-tree search and coined the name Monte Carlo tree search to solve this problem. Instead of scoring an unfinished board, the algorithm uses playouts (also called rollouts). From the board position it wants to test, the computer plays random legal moves for both sides until the game ends.
One random game tells you very little. A good move can easily lose if the random moves that follow it are terrible. But if the computer runs thousands of playouts from the same position, a strong position will win a higher percentage of these random games than a weak one. This lets the computer judge moves using only the rules of the game, without human strategy.
Fact-checked against Monte Carlo tree search on Wikipedia
Part of the Computer science syllabus: Artificial Intelligence and Modern Computing
See it on the timeline of Computer science