written 6.2 years ago by |
Minimax algorithm evaluates decision based on the present status of the game. This algorithm needs deterministic environment with exact information.
Minimax algorithm directly implements the defining equation. Every time based on the successor state minimax value is calculated with the help of simple recursive computation.
In case of minimax algorithm the selected action with the highest minimax value should be equal to the best possible payoff(outcome) against best play.
To understand it we will take random stage:-
Step 1: Create an entire game tree including all the terminal states.
Start action: ‘O’
Next action: ‘X’
Next action ‘O’:
Step 2: For every terminal state find out utility. Terminal position where 1 means win and 0 means draw.
Step 3: Apply MIN and MAX operators on the nodes of the present stage and propagate the utility values upward in the three.
Step 4: With the max utility value select the action at the root node using minimax decision.
Properties of Minimax:
It is considered as complete if the game tree size is finite.
Time complexity is indicated as O(bm).
It is considered Optimal when it is played against an optimal number of opponents.