3
$\begingroup$

Should I use minimax or alpha-beta pruning (or both)? Apparently, alpha-beta pruning prunes some parts of the search tree.

$\endgroup$
0

2 Answers 2

7
$\begingroup$

Both algorithms should give the same answer. However, their main difference is that alpha-beta does not explore all paths, like minimax does, but prunes those that are guaranteed not to be an optimal state for the current player, that is max or min. So, alpha-beta is a better implementation of minimax.

Here are the time complexities of both algorithms

  • Minimax: $\mathcal{O}(b^d)$,
  • Alpha-beta (best-case scenario): $\mathcal{O}(b^{d/2}) = \mathcal{O}(\sqrt{b^d})$

where $b$ is an average branching factor with a search depth of $d$ plies.

$\endgroup$
0
1
$\begingroup$

Minimax is the base algorithm, and alpha beta pruning is an optimisation that you can apply to minimax to make it more efficient.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .