2
$\begingroup$

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

$\endgroup$
0
5
$\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
0
$\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$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.