Mini-Max Algorithm in Artificial Intelligence

Working of Min-Max Algorithm:

Step-1: In the first step, the algorithm generates the entire game-tree and apply the utility function to get the utility values for the terminal states. In the below tree diagram, let's take A is the initial state of the tree. Suppose maximizer takes first turn which has worst-case initial value =- infinity, and minimizer will take next turn which has worst-case initial value = +infinity.

mini-max-algorithm-in-ai-step1.png

Step 2: Next, we determine the utility values for the Maximizer. Starting with an initial value of -∞, we compare each terminal state value with the Maximizer's current value and select the higher one. This process finds the maximum value among all options.