Answers.Body: <blockquote>
    <p>So far, I have considered only three algorithms, namely, minimax, alpha-beta pruning, and Monte Carlo tree search (MCTS). Apparently, both the alpha-beta pruning and MCTS are extensions of the basic minimax algorithm.</p>
  </blockquote>
  
  <p><strong>Given this context, I would recommend starting out with Minimax</strong>. Of the three algorithms, Minimax is the easiest to understand.</p>
  
  <p><strong>Alpha-Beta</strong>, as others have mentioned in other answers, is a strict improvement on top of Minimax. Minimax is basically a part of the Alpha-Beta implementation, and a good understanding of Alpha-Beta requires starting out with a good understanding of Minimax anyway. If you happen to have time left after understanding and implementing Minimax, I'd recommend moving on to Alpha-Beta afterwards and building that on top of Minimax. Starting out with Alpha-Beta if you do not yet understand Minimax doesn't really make sense.</p>
  
  <p><strong>Monte-Carlo Tree Search</strong> is probably a bit more advanced and more complicated to really, deeply understand. In the past decade or so, MCTS really has been growing to be much more popular than the other two, so from that point of view understanding MCTS may be more "useful". </p>
  
  <p>The connection between Minimax and MCTS is less direct/obvious than the connection between Minimax and Alpha-Beta, but there still is a connection at least on a conceptual level. <strong>I'd argue that having a good understanding of Minimax first is still beneficial before diving into MCTS</strong>; in particular, understanding Minimax and its flaws/weak points can provide useful context / help you understand why MCTS became "necessary" / popular.</p>
  
  <hr>
  
  <p>To conclude, in my opinion:</p>
  
  <ul>
  <li>Alpha-Beta is strictly better than Minimax, but also strongly related / built on top of Minimax; so, start with Minimax, go for Alpha-Beta afterwards if time permits</li>
  <li>MCTS has different strengths/weaknesses, is often better than Alpha-Beta in "modern" problems (but not always), a good understanding of Minimax will likely be beneficial before starting to dive into MCTS</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-07T16:21:28.343Z
Answers.Text: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/117030/discussion-on-answer-by-dennis-soemers-how-do-i-choose-the-best-algorithm-for-a).
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-16T19:07:25.377Z
Answers.LastActivityDate: 2020-05-01T11:56:55.517Z
Answers.LastEditDate: 2020-05-01T11:56:55.517Z
Answers.UserDisplayName: Dennis Soemers
Answers.Body: <p>If you have to choose between minimax and alpha-beta pruning, you should choose alpha-beta. It is more efficient and fast because it can prune a substantial part of your exploration tree. But you need to order the actions from the best to the worst depending on max or min point of view, so the algorithm can quickly realize if the exploration is necessary. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-16T16:09:33.520Z
Answers.LastActivityDate: 2020-05-01T11:55:32.200Z
Answers.LastEditDate: 2020-05-01T11:55:32.200Z
Answers.UserDisplayName: kaizokun
Answers.Body: <p><strong>tl;dr:</strong></p>
  
  <ul>
  <li><p>None of these algorithms are practical for modern work, but they are good places to start pedagogically. </p></li>
  <li><p>You should always prefer to use Alpha-Beta pruning over bare minimax search.</p></li>
  <li><p>You should prefer to use some form of heuristic guided search if you can come up with a useful heuristic. Coming up with a useful heuristic usually requires a lot of domain knowledge.</p></li>
  <li><p>You should prefer to use Monte Carlo Tree search when you lack a good heuristic, when computational resources are limited, and when mistakes will not have outsize real-world consequences.</p></li>
  </ul>
  
  <p><strong>More Details:</strong></p>
  
  <p>In minimax search, we do not attempt to be very clever. We just use a standard dynamic programming approach. It is easy to figure out the value of difference moves if we're close to the end of the game (since the game will end in the next move, we don't have to look very far ahead). Similarly, if we know what our opponent will do in the last move of the game, it's easy to figure out what we should do in the second last move. Effectively we can treat the second last move as the last move of a shorter game. We can then repeat this process. Using this approach is certain to uncover the best strategies in a standard extensive-form game, but will require us to consider every possible move, which is infeasible for all but the simplest games.</p>
  
  <p>Alpha-Beta pruning is a strict improvement on Minimax search. It makes use of the fact that some moves are obviously worse than others. For example, in chess, I need not consider any move that would give you the <em>opportunity</em> to put me in checkmate, even if you could do other things from that position. Once I see that a move might lead to a lose, I'm not going to bother thinking about what else might happen from that point. I'll go look at other things. This algorithm is also certain to yield the correct result, and is faster, but still must consider most of the moves in practice.</p>
  
  <p>There are two common ways you can get around the extreme computational cost of solving these kinds of games exactly:</p>
  
  <ol>
  <li><p>Use a Heuristic (A* search is the usual algorithm for pedagogical purposes, but Quiescence search is a similar idea in 2 player games). This is just a function that gives an <em>estimate</em> of the value of a state of the game. Instead of considering all the moves in a game, you can just consider moves out to some finite distance ahead, and then use the value of the heuristic to judge the value of the states you reached. If your heuristic is consistent (essentially: if it always <em>overestimates</em> the quality of states), then this will still yield the correct answer, but with enormous speedups in practice.</p></li>
  <li><p>Use Rollouts (like Monte Carlo Tree Search). Basically, instead of considering every move, run a few thousand simulated games between players acting randomly (this is faster than considering all possible moves). Assign a value to states equal to the average win rate of games starting from it. This may not yield the correct answer, but in some kinds of games, it performs reliably. It is often used as an extension of more exact techniques, rather than being used on its own.</p></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-07T16:21:10.440Z
Answers.Text: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/117029/discussion-on-answer-by-john-doucette-how-do-i-choose-the-best-algorithm-for-a-b).
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-16T18:31:16.950Z
Answers.LastActivityDate: 2018-07-16T21:31:59.717Z
Answers.LastEditDate: 2018-07-16T21:31:59.717Z
Answers.UserDisplayName: John Doucette
Body: <p>How do I choose the best algorithm for a board game like checkers?</p>
  
  <p>So far, I have considered only three algorithms, namely, minimax, alpha-beta pruning, and Monte Carlo tree search (MCTS). Apparently, both the alpha-beta pruning and MCTS are extensions of the basic minimax algorithm.</p>
  
Tags: <game-ai><applications><monte-carlo-tree-search><minimax><alpha-beta-pruning>
Title: How do I choose the best algorithm for a board game like checkers?
UserDisplayName: JoeyB
ThreadText: # How do I choose the best algorithm for a board game like checkers?
  
  (Asked by: username_0 on 2018-07-16)
  
  How do I choose the best algorithm for a board game like checkers?
  
  So far, I have considered only three algorithms, namely, minimax, alpha-beta pruning, and Monte Carlo tree search (MCTS). Apparently, both the alpha-beta pruning and MCTS are extensions of the basic minimax algorithm.
  
  **Tags:** game-ai, applications, monte-carlo-tree-search, minimax, alpha-beta-pruning
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_4 on 2018-07-16. Score: 23 | Accepted answer
  
  **tl;dr:**
  
  * None of these algorithms are practical for modern work, but they are good places to start pedagogically.
  * You should always prefer to use Alpha-Beta pruning over bare minimax search.
  * You should prefer to use some form of heuristic guided search if you can come up with a useful heuristic. Coming up with a useful heuristic usually requires a lot of domain knowledge.
  * You should prefer to use Monte Carlo Tree search when you lack a good heuristic, when computational resources are limited, and when mistakes will not have outsize real-world consequences.
  
  **More Details:**
  
  In minimax search, we do not attempt to be very clever. We just use a standard dynamic programming approach. It is easy to figure out the value of difference moves if we're close to the end of the game (since the game will end in the next move, we don't have to look very far ahead). Similarly, if we know what our opponent will do in the last move of the game, it's easy to figure out what we should do in the second last move. Effectively we can treat the second last move as the last move of a shorter game. We can then repeat this process. Using this approach is certain to uncover the best strategies in a standard extensive-form game, but will require us to consider every possible move, which is infeasible for all but the simplest games.
  
  Alpha-Beta pruning is a strict improvement on Minimax search. It makes use of the fact that some moves are obviously worse than others. For example, in chess, I need not consider any move that would give you the *opportunity* to put me in checkmate, even if you could do other things from that position. Once I see that a move might lead to a lose, I'm not going to bother thinking about what else might happen from that point. I'll go look at other things. This algorithm is also certain to yield the correct result, and is faster, but still must consider most of the moves in practice.
  
  There are two common ways you can get around the extreme computational cost of solving these kinds of games exactly:
  
  1. Use a Heuristic (A\* search is the usual algorithm for pedagogical purposes, but Quiescence search is a similar idea in 2 player games). This is just a function that gives an *estimate* of the value of a state of the game. Instead of considering all the moves in a game, you can just consider moves out to some finite distance ahead, and then use the value of the heuristic to judge the value of the states you reached. If your heuristic is consistent (essentially: if it always *overestimates* the quality of states), then this will still yield the correct answer, but with enormous speedups in practice.
  2. Use Rollouts (like Monte Carlo Tree Search). Basically, instead of considering every move, run a few thousand simulated games between players acting randomly (this is faster than considering all possible moves). Assign a value to states equal to the average win rate of games starting from it. This may not yield the correct answer, but in some kinds of games, it performs reliably. It is often used as an extension of more exact techniques, rather than being used on its own.
  
  > **Comments:**
  > **username_2**: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/117029/discussion-on-answer-by-username_4-username_4-how-do-i-choose-the-best-algorithm-for-a-b).  
  
  ---
  
  ### Answer by username_1 on 2018-07-16. Score: 9
  
  > So far, I have considered only three algorithms, namely, minimax, alpha-beta pruning, and Monte Carlo tree search (MCTS). Apparently, both the alpha-beta pruning and MCTS are extensions of the basic minimax algorithm.
  
  **Given this context, I would recommend starting out with Minimax**. Of the three algorithms, Minimax is the easiest to understand.
  
  **Alpha-Beta**, as others have mentioned in other answers, is a strict improvement on top of Minimax. Minimax is basically a part of the Alpha-Beta implementation, and a good understanding of Alpha-Beta requires starting out with a good understanding of Minimax anyway. If you happen to have time left after understanding and implementing Minimax, I'd recommend moving on to Alpha-Beta afterwards and building that on top of Minimax. Starting out with Alpha-Beta if you do not yet understand Minimax doesn't really make sense.
  
  **Monte-Carlo Tree Search** is probably a bit more advanced and more complicated to really, deeply understand. In the past decade or so, MCTS really has been growing to be much more popular than the other two, so from that point of view understanding MCTS may be more "useful".
  
  The connection between Minimax and MCTS is less direct/obvious than the connection between Minimax and Alpha-Beta, but there still is a connection at least on a conceptual level. **I'd argue that having a good understanding of Minimax first is still beneficial before diving into MCTS**; in particular, understanding Minimax and its flaws/weak points can provide useful context / help you understand why MCTS became "necessary" / popular.
  
  ---
  
  To conclude, in my opinion:
  
  * Alpha-Beta is strictly better than Minimax, but also strongly related / built on top of Minimax; so, start with Minimax, go for Alpha-Beta afterwards if time permits
  * MCTS has different strengths/weaknesses, is often better than Alpha-Beta in "modern" problems (but not always), a good understanding of Minimax will likely be beneficial before starting to dive into MCTS
  
  > **Comments:**
  > **username_2**: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/117030/discussion-on-answer-by-username_1-username_1-how-do-i-choose-the-best-algorithm-for-a).  
  
  ---
  
  ### Answer by username_3 on 2018-07-16. Score: 2
  
  If you have to choose between minimax and alpha-beta pruning, you should choose alpha-beta. It is more efficient and fast because it can prune a substantial part of your exploration tree. But you need to order the actions from the best to the worst depending on max or min point of view, so the algorithm can quickly realize if the exploration is necessary.
  
  
  ---
  
  