Mini-Max Algorithm in Artificial Intelligence

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Quiz

Mini-Max Algorithm in Artificial Intelligence


Minimax is a kind of  backtracking  algorithm that is used in decision making and
game theory to find the optimal move for a player, assuming that your opponent
also plays optimally. It is widely used in two player turn-based games such as
Tic-Tac-Toe, Backgammon, Mancala, Chess, etc.
In Minimax the two players are called maximizer and minimizer.
The maximizer tries to get the highest score possible while the  minimizer tries to
do the opposite and get the lowest score possible.

Working of Min-Max Algorithm:


o The working of the minimax algorithm can be easily described using an
example. Below we have taken an example of game-tree which is
representing the two-player game.
o In this example, there are two players one is called Maximizer and other is
called Minimizer.
o Maximizer will try to get the Maximum possible score, and Minimizer will try
to get the minimum possible score.
o This algorithm applies DFS, so in this game-tree, we have to go all the way
through the leaves to reach the terminal nodes.
o At the terminal node, the terminal values are given so we will compare those
value and backtrack the tree until the initial state occurs. Following are the
main steps involved in solving the two-player game tree

Properties of Mini-Max algorithm:


o Complete-  Min-Max algorithm is Complete. It will definitely find a solution (if
exist), in the finite search tree.
o Optimal-  Min-Max algorithm is optimal if both opponents are playing
optimally.
o Time complexity-  As it performs DFS for the game-tree, so the time
complexity of Min-Max algorithm is O(bm), where b is branching factor of the
game-tree, and m is the maximum depth of the tree.
Quiz

o Space Complexity- Space complexity of Mini-max algorithm is also similar


to DFS which is  O(bm).

Limitation of the minimax Algorithm:


The main drawback of the minimax algorithm is that it gets really slow for complex
games such as Chess, go, etc. This type of games has a huge branching factor, and
the player has lots of choices to decide. This limitation of the minimax algorithm can
be improved from  alpha-beta pruning which we have discussed in the next
topic.

 Because of the huge branching factor, the process of reaching the


goal is slower.
 Evaluation and search of all possible nodes and branches degrades
the performance and efficiency of the engine.
 Both the players have too many choices to decide from.

You might also like