Working of Minimax
Algorithm With Alpha-Beta
Pruning
BY M. HASSAN ARSHAD
Minmax Algorithm:
The minimax concept has a rich history dating back to 1928 when John von Neumann first formalized
it in his paper “On the Theory of Games of Strategy”. This groundbreaking work laid the foundation for modern game
theory and decision-making algorithms.
History:
• Minimax is an adversarial search algorithm used in two-player, zero-sum games (like Tic-Tac-Toe, Chess, Checkers).
• Its goal is to minimize the possible loss for a player assuming that the opponent plays optimally.
• The algorithm explores the entire game tree, evaluating the possible moves for both players:
Minimax:
•In ordinary search problems (like pathfinding), the environment is static and deterministic.
•In adversarial search, another rational agent (the opponent) is actively trying to counter your moves.
•Therefore, every decision must anticipate the best counter-move of the opponent
Why is Minimax Adversarial:
•Yes, Minimax is complete. It will always find a solution (i.e., a terminal game state) if one exists.
•The completeness depends on the depth factor, which limits the search tree because in more complex game (i.e., Chess) the branching
factor increases exponentially and there are scenarios when the repetition of the moves do not result in the outcome of the game.
Is Minimax Complete?
Minmax Components:
Snapshot of the game before the search algorithm starts. After the search is complete,
the players will make their move on this position.
Game State ->
An arbitrary state in the game that can be reached by the combination of player moves in the
future.
State Node ->
Numerical Value to determine the score of a player at a given state node. It is used to figure out
which Player is performing better at the given position.
Utility Score ->
•The MAX player tries to maximize the Utility score (best outcome for itself).
•The MIN player tries to minimize the Utility score (best outcome for the opponent).
Combination the utility score of both player at a given Node is Zero, that’s why these types of
games are called “Zero-Sum Games”.
Players ->
•Determines whether a state is terminal, meaning the game has ended or the search has
reached the depth limit.
•Evaluates the utility Score for the Node based on a Formula. The formula is different for every
game, and the formula changes weather the game has ended or we are to evaluate the position
early due to depth limit by using heuristic approach.
•The terminal test has the highest time cost in Minimax because it is called recursively at every
leaf of the game tree — for every possible sequence of moves until the end of the game.
Terminal Test ->
Minmax Algorithm Working:
• At a certain state of the game a player may has multiple options to chose their turn from.
• The algorithm explores all possible future states of the game.
• Starting from the current board, for each legal move it recursively simulates:
“If I make this move what my opponent can play?” and then simulates it with the perspective of the opponent.
• After considering any move, the state of the game is updated for that recursive call and terminal test is applied to check if
• The game has reached its conclusion i.e. if a player has won the game, it’s a draw or the depth limit has been reached.
• This recursive calling of the function for each move creates a level wise tree where each node represents possible future state
that the players can attain.
• When a terminal state is reached the score utility is generated by the terminal test according to the rules of the game, but
a draw condition always has a value of 0.
• After reaching all terminal states, the values are propagated back up to the root of the tree (initial state):
If it’s a MAX level of the tree → highest score is chosen for returning (best for MAX).
If it’s a MIN level of the tree → lowest score is chosen for returning (best for MIN).
• Whenever a score utility is returned for a certain move, it is checked if the move
that leads to this score is more or less favorable for the player, if it is move favorable
Then this knowledge is stored until the value is returned from all of the paths.
Utility Score of Tic-Tac-Toe Turns:
• Here Max is controlled by the computer and it is represented by X.
• 10 is Highest and Best Value For Max. 0 means if the opponent plays perfect playing on the
box will result in a draw. -10 means the Min will win.
Alpha-Beta Pruning:
• Alpha-Beta Pruning is an optimization technique applied to the Minimax algorithm.
• It reduces the number of nodes the algorithm needs to evaluate in the game tree.
• Alpha-Beta Pruning helps by ignoring branches that cannot affect the final decision.
Alpha and Beta:
• At each node, we maintain two values:
α (Alpha): The best value that the MAX player can guarantee so far.
β (Beta): The best value that the MIN player can guarantee so far.
• As the tree is explored:
MAX nodes try to increase α (maximize score).
MIN nodes try to decrease β (minimize score).
If at any point α ≥ β, further exploration of that branch is stopped (pruned),
because neither player will ever choose that path.
Alpha-Beta Pruning does not change the Minimax output,
it only reduces the number of nodes explored by avoiding irrelevant branches.
Effect of pruning on Results:
Alpha-Beta Pruning Optimization:
Drastic Difference between the
number of searched nodes
without and with alpha-Beta
pruning even though the results
are same.
Player Turn With Pruning
Without Pruning
Generic Minimax Pseudo Code implementation:
• The function recursively explores all legal moves by generating next
possible game states and alternative between maxing and minimizing.
• The definition of Terminal test and possible legal moves is different for each
game. For example, in Tic Tac Toe the game ends when a player has 3
marks in a row/column/diagonal or if the board is full (draw).
• Best Value, alpha and beta are generated respective to the Min and Max
turn and are initialized with worst case scenario for the current player
because a search will find better path for the player to follow.
• If at any point β ≤ α, it means:
The opponent already has a better alternative elsewhere.
So, further exploration is unnecessary → prune the branch.
• Each recursive call returns the best possible score for a player at that
depth.
• Alpha and Beta values never propagate upward in the tree. That’s why
alpha beta values have no influence outside their subtree, they only
influence their sibling nodes and their subtrees.
• Eventually, the root call returns the optimal move value for the entire
game.
Working of Minimax on a Tree.
-∞
[-∞, ∞] Max
• First Max Call of the minimax
function.
• The Best Value is initialized by
-∞.
• The value of α is -∞.
• The Value of β is ∞.
• Β <= α not met.
Working of Minimax on a Tree.
-∞
∞
[-∞, ∞]
[-∞, ∞]
Max
Min
• Min call for a state.
• The Best Value is initialized by
∞.
• The value of α is -∞.
• The Value of β is ∞.
• Β <= α not met.
Working of Minimax on a Tree.
-∞
∞
[-∞, ∞]
[-∞, ∞]
[-∞, ∞]
Max
Min
Max
• Max call for a state.
• The Best Value is initialized by
-∞.
• The value of α is -∞.
• The Value of β is ∞.
• Β <= α not met.
-∞
Working of Minimax on a Tree.
-∞
∞
6
[-∞, ∞]
[-∞, ∞]
[-∞, ∞]
Max
Min
Max
Terminal
(Min)
• First Minimax call for a state.
• Evaluated score from the
terminal test revealed a score
of 6 for the state.
• The value of α is -∞.
• The Value of β is ∞.
• Β <= α not met.
-∞
Working of Minimax on a Tree.
-∞
∞
6
[-∞, ∞]
[-∞, ∞]
[6, ∞]
Max
Min
Max
Terminal
(Min)
• 6 returns to its parent.
• The value of α becomes 6
along with the best value
because 6< -∞.
• The Value of β is ∞.
• Β <= α not met.
6
Working of Minimax on a Tree.
-∞
∞
6 8
[-∞, ∞]
[-∞, ∞]
[6, ∞]
Max
Min
Max
Terminal
(Min)
• Evaluated score from the
terminal test revealed a score
of 8 for the state.
• The value of α is -∞.
• The Value of β is ∞.
• Β <= α not met.
6
Working of Minimax on a Tree.
-∞
∞
6 8
[-∞, ∞]
[-∞, ∞]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• 8 returns to its parent.
• The value of α becomes 8
along with the best value
because 8< 6.
• The Value of β is ∞.
• Β <= α not met.
8
Working of Minimax on a Tree.
-∞
8
6 8
[-∞, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• 8 returns to its parent.
• The value of α is -∞.
• The Value of β becomes 8
along with best value
because 8< ∞ .
• Β <= α not met.
8
Working of Minimax on a Tree.
-∞
8
6 8
[-∞, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• Max call for a state.
• The Best Value is 8 from
previous subtree.
• The value of α is -∞.
• The Value of β is 8 from
previous subtree.
• Β <= α not met.
8 8
[-∞, 8]
Working of Minimax on a Tree.
-∞
8
6 8
[-∞, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• First Minimax call for a state.
• Evaluated score from the
terminal test revealed a score
of 9 for the state.
• The value of α is -∞.
• The Value of β is ∞.
• Β <= α not met.
8 8
[-∞, 8]
9
Working of Minimax on a Tree.
-∞
8
6 8
[-∞, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• 9 returns to its parent.
• The value of α becomes 9
along with the best value
because 9< 8.
• The Value of β is ∞.
• Β <= α is met ,the loop breaks
and the subtree is pruned.
8 9
[9, 8]
9
Working of Minimax on a Tree.
-∞
8
6 8
[-∞, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• 9 returns to its parent.
• Nothing changes because its
Min and 8<9.
• The value of α is -∞.
• The Value of β is 8.
• Β <= α not met.
8 9
[9, 8]
9
Working of Minimax on a Tree.
8
8
6 8
[8, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• 8 returns to its parent.
• The value of α becomes 8
because 8>-∞.
• The Value of β is ∞.
• Β <= α not met.
8 9
[9, 8]
9
Working of Minimax on a Tree.
8
8
6 8
[8, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• Min call for a state.
• The Best Value is 8 from
previous subtree.
• The value of α is 8.
• The Value of β is ∞.
• Β <= α not met.
8 9
[9, 8]
9
8
[8, ∞]
Working of Minimax on a Tree.
8
8
6 8
[8, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• Max call for a state.
• The Best Value is 8 from
previous subtree.
• The value of α is 8.
• The Value of β is ∞.
• Β <= α not met.
8 9
[9, 8]
9
8
[8, ∞]
8
[8, ∞]
Working of Minimax on a Tree.
8
8
6 8
[8, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• Min call for a state.
• Terminal Test reveals a value
of 7.
• The value of α is 8.
• The Value of β is ∞.
• Β <= α not met.
8 9
[9, 8]
9
8
[8, ∞]
8
[8, ∞]
7
Working of Minimax on a Tree.
8
8
6 8
[8, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• Nothing changes because
8>7.
• The value of α is 8.
• The Value of β is ∞.
• Β <= α not met.
8 9
[9, 8]
9
8
[8, ∞]
8
[8, ∞]
7
Working of Minimax on a Tree.
8
8
6 8
[8, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• Min call for a state.
• Terminal Test reveals a value
of -1.
• The value of α is 8.
• The Value of β is ∞.
• Β <= α not met.
8 9
[9, 8]
9
8
[8, ∞]
8
[8, ∞]
7 -1
Working of Minimax on a Tree.
8
8
6 8
[8, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• Nothing changes because
8>-1.
• The value of α is 8.
• The Value of β is ∞.
• Β <= α not met.
8 9
[9, 8]
9
8
[8, ∞]
8
[8, ∞]
7 -1
Working of Minimax on a Tree.
8
8
6 8
[8, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• Nothing changes because
8==8.
• The value of α is 8.
• The Value of β is becomes 8
because 8< ∞.
• Β <= α is met ,the loop breaks
and the subtree is pruned.
8 9
[9, 8]
9
8
[8, 8]
8
[8, ∞]
7 -1
Working of Minimax on a Tree.
8
8
6 8
[8, ∞]
[-∞, 8]
[8, ∞]
Max
Min
Max
Terminal
(Min)
• Min call for a state.
• The Best Value is 8 from
previous subtree.
• The value of α is 8.
• The Value of β is ∞.
• Β <= α not met.
8 9
[9, 8]
9
8
[8, 8]
8
[8, ∞]
7 -1
Sources:
“Understanding Game Theory in AI”
Lecture by Dr. Ghulam Mustafa
At Department of Information Technology
"Research on Different Heuristics for Minimax Algorithm Insight from Connect-4 Game"
written by Xiyu Kang, Yiqi Wang, Yanrui Hu,
published by Journal of Intelligent Learning Systems and Applications, Vol.11 No.2, 2019
"Tic Tac Toe Super "
App developed by M. Hassan Arshad at OrbitZero Studios.

Working of Minimax Algorithm with Alpha-Beta Pruning.pptx

  • 1.
    Working of Minimax AlgorithmWith Alpha-Beta Pruning BY M. HASSAN ARSHAD
  • 2.
    Minmax Algorithm: The minimaxconcept has a rich history dating back to 1928 when John von Neumann first formalized it in his paper “On the Theory of Games of Strategy”. This groundbreaking work laid the foundation for modern game theory and decision-making algorithms. History: • Minimax is an adversarial search algorithm used in two-player, zero-sum games (like Tic-Tac-Toe, Chess, Checkers). • Its goal is to minimize the possible loss for a player assuming that the opponent plays optimally. • The algorithm explores the entire game tree, evaluating the possible moves for both players: Minimax: •In ordinary search problems (like pathfinding), the environment is static and deterministic. •In adversarial search, another rational agent (the opponent) is actively trying to counter your moves. •Therefore, every decision must anticipate the best counter-move of the opponent Why is Minimax Adversarial: •Yes, Minimax is complete. It will always find a solution (i.e., a terminal game state) if one exists. •The completeness depends on the depth factor, which limits the search tree because in more complex game (i.e., Chess) the branching factor increases exponentially and there are scenarios when the repetition of the moves do not result in the outcome of the game. Is Minimax Complete?
  • 3.
    Minmax Components: Snapshot ofthe game before the search algorithm starts. After the search is complete, the players will make their move on this position. Game State -> An arbitrary state in the game that can be reached by the combination of player moves in the future. State Node -> Numerical Value to determine the score of a player at a given state node. It is used to figure out which Player is performing better at the given position. Utility Score -> •The MAX player tries to maximize the Utility score (best outcome for itself). •The MIN player tries to minimize the Utility score (best outcome for the opponent). Combination the utility score of both player at a given Node is Zero, that’s why these types of games are called “Zero-Sum Games”. Players -> •Determines whether a state is terminal, meaning the game has ended or the search has reached the depth limit. •Evaluates the utility Score for the Node based on a Formula. The formula is different for every game, and the formula changes weather the game has ended or we are to evaluate the position early due to depth limit by using heuristic approach. •The terminal test has the highest time cost in Minimax because it is called recursively at every leaf of the game tree — for every possible sequence of moves until the end of the game. Terminal Test ->
  • 4.
    Minmax Algorithm Working: •At a certain state of the game a player may has multiple options to chose their turn from. • The algorithm explores all possible future states of the game. • Starting from the current board, for each legal move it recursively simulates: “If I make this move what my opponent can play?” and then simulates it with the perspective of the opponent. • After considering any move, the state of the game is updated for that recursive call and terminal test is applied to check if • The game has reached its conclusion i.e. if a player has won the game, it’s a draw or the depth limit has been reached. • This recursive calling of the function for each move creates a level wise tree where each node represents possible future state that the players can attain. • When a terminal state is reached the score utility is generated by the terminal test according to the rules of the game, but a draw condition always has a value of 0. • After reaching all terminal states, the values are propagated back up to the root of the tree (initial state): If it’s a MAX level of the tree → highest score is chosen for returning (best for MAX). If it’s a MIN level of the tree → lowest score is chosen for returning (best for MIN). • Whenever a score utility is returned for a certain move, it is checked if the move that leads to this score is more or less favorable for the player, if it is move favorable Then this knowledge is stored until the value is returned from all of the paths.
  • 5.
    Utility Score ofTic-Tac-Toe Turns: • Here Max is controlled by the computer and it is represented by X. • 10 is Highest and Best Value For Max. 0 means if the opponent plays perfect playing on the box will result in a draw. -10 means the Min will win.
  • 6.
    Alpha-Beta Pruning: • Alpha-BetaPruning is an optimization technique applied to the Minimax algorithm. • It reduces the number of nodes the algorithm needs to evaluate in the game tree. • Alpha-Beta Pruning helps by ignoring branches that cannot affect the final decision. Alpha and Beta: • At each node, we maintain two values: α (Alpha): The best value that the MAX player can guarantee so far. β (Beta): The best value that the MIN player can guarantee so far. • As the tree is explored: MAX nodes try to increase α (maximize score). MIN nodes try to decrease β (minimize score). If at any point α ≥ β, further exploration of that branch is stopped (pruned), because neither player will ever choose that path. Alpha-Beta Pruning does not change the Minimax output, it only reduces the number of nodes explored by avoiding irrelevant branches. Effect of pruning on Results:
  • 7.
    Alpha-Beta Pruning Optimization: DrasticDifference between the number of searched nodes without and with alpha-Beta pruning even though the results are same. Player Turn With Pruning Without Pruning
  • 8.
    Generic Minimax PseudoCode implementation: • The function recursively explores all legal moves by generating next possible game states and alternative between maxing and minimizing. • The definition of Terminal test and possible legal moves is different for each game. For example, in Tic Tac Toe the game ends when a player has 3 marks in a row/column/diagonal or if the board is full (draw). • Best Value, alpha and beta are generated respective to the Min and Max turn and are initialized with worst case scenario for the current player because a search will find better path for the player to follow. • If at any point β ≤ α, it means: The opponent already has a better alternative elsewhere. So, further exploration is unnecessary → prune the branch. • Each recursive call returns the best possible score for a player at that depth. • Alpha and Beta values never propagate upward in the tree. That’s why alpha beta values have no influence outside their subtree, they only influence their sibling nodes and their subtrees. • Eventually, the root call returns the optimal move value for the entire game.
  • 9.
    Working of Minimaxon a Tree. -∞ [-∞, ∞] Max • First Max Call of the minimax function. • The Best Value is initialized by -∞. • The value of α is -∞. • The Value of β is ∞. • Β <= α not met.
  • 10.
    Working of Minimaxon a Tree. -∞ ∞ [-∞, ∞] [-∞, ∞] Max Min • Min call for a state. • The Best Value is initialized by ∞. • The value of α is -∞. • The Value of β is ∞. • Β <= α not met.
  • 11.
    Working of Minimaxon a Tree. -∞ ∞ [-∞, ∞] [-∞, ∞] [-∞, ∞] Max Min Max • Max call for a state. • The Best Value is initialized by -∞. • The value of α is -∞. • The Value of β is ∞. • Β <= α not met. -∞
  • 12.
    Working of Minimaxon a Tree. -∞ ∞ 6 [-∞, ∞] [-∞, ∞] [-∞, ∞] Max Min Max Terminal (Min) • First Minimax call for a state. • Evaluated score from the terminal test revealed a score of 6 for the state. • The value of α is -∞. • The Value of β is ∞. • Β <= α not met. -∞
  • 13.
    Working of Minimaxon a Tree. -∞ ∞ 6 [-∞, ∞] [-∞, ∞] [6, ∞] Max Min Max Terminal (Min) • 6 returns to its parent. • The value of α becomes 6 along with the best value because 6< -∞. • The Value of β is ∞. • Β <= α not met. 6
  • 14.
    Working of Minimaxon a Tree. -∞ ∞ 6 8 [-∞, ∞] [-∞, ∞] [6, ∞] Max Min Max Terminal (Min) • Evaluated score from the terminal test revealed a score of 8 for the state. • The value of α is -∞. • The Value of β is ∞. • Β <= α not met. 6
  • 15.
    Working of Minimaxon a Tree. -∞ ∞ 6 8 [-∞, ∞] [-∞, ∞] [8, ∞] Max Min Max Terminal (Min) • 8 returns to its parent. • The value of α becomes 8 along with the best value because 8< 6. • The Value of β is ∞. • Β <= α not met. 8
  • 16.
    Working of Minimaxon a Tree. -∞ 8 6 8 [-∞, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • 8 returns to its parent. • The value of α is -∞. • The Value of β becomes 8 along with best value because 8< ∞ . • Β <= α not met. 8
  • 17.
    Working of Minimaxon a Tree. -∞ 8 6 8 [-∞, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • Max call for a state. • The Best Value is 8 from previous subtree. • The value of α is -∞. • The Value of β is 8 from previous subtree. • Β <= α not met. 8 8 [-∞, 8]
  • 18.
    Working of Minimaxon a Tree. -∞ 8 6 8 [-∞, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • First Minimax call for a state. • Evaluated score from the terminal test revealed a score of 9 for the state. • The value of α is -∞. • The Value of β is ∞. • Β <= α not met. 8 8 [-∞, 8] 9
  • 19.
    Working of Minimaxon a Tree. -∞ 8 6 8 [-∞, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • 9 returns to its parent. • The value of α becomes 9 along with the best value because 9< 8. • The Value of β is ∞. • Β <= α is met ,the loop breaks and the subtree is pruned. 8 9 [9, 8] 9
  • 20.
    Working of Minimaxon a Tree. -∞ 8 6 8 [-∞, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • 9 returns to its parent. • Nothing changes because its Min and 8<9. • The value of α is -∞. • The Value of β is 8. • Β <= α not met. 8 9 [9, 8] 9
  • 21.
    Working of Minimaxon a Tree. 8 8 6 8 [8, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • 8 returns to its parent. • The value of α becomes 8 because 8>-∞. • The Value of β is ∞. • Β <= α not met. 8 9 [9, 8] 9
  • 22.
    Working of Minimaxon a Tree. 8 8 6 8 [8, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • Min call for a state. • The Best Value is 8 from previous subtree. • The value of α is 8. • The Value of β is ∞. • Β <= α not met. 8 9 [9, 8] 9 8 [8, ∞]
  • 23.
    Working of Minimaxon a Tree. 8 8 6 8 [8, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • Max call for a state. • The Best Value is 8 from previous subtree. • The value of α is 8. • The Value of β is ∞. • Β <= α not met. 8 9 [9, 8] 9 8 [8, ∞] 8 [8, ∞]
  • 24.
    Working of Minimaxon a Tree. 8 8 6 8 [8, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • Min call for a state. • Terminal Test reveals a value of 7. • The value of α is 8. • The Value of β is ∞. • Β <= α not met. 8 9 [9, 8] 9 8 [8, ∞] 8 [8, ∞] 7
  • 25.
    Working of Minimaxon a Tree. 8 8 6 8 [8, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • Nothing changes because 8>7. • The value of α is 8. • The Value of β is ∞. • Β <= α not met. 8 9 [9, 8] 9 8 [8, ∞] 8 [8, ∞] 7
  • 26.
    Working of Minimaxon a Tree. 8 8 6 8 [8, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • Min call for a state. • Terminal Test reveals a value of -1. • The value of α is 8. • The Value of β is ∞. • Β <= α not met. 8 9 [9, 8] 9 8 [8, ∞] 8 [8, ∞] 7 -1
  • 27.
    Working of Minimaxon a Tree. 8 8 6 8 [8, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • Nothing changes because 8>-1. • The value of α is 8. • The Value of β is ∞. • Β <= α not met. 8 9 [9, 8] 9 8 [8, ∞] 8 [8, ∞] 7 -1
  • 28.
    Working of Minimaxon a Tree. 8 8 6 8 [8, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • Nothing changes because 8==8. • The value of α is 8. • The Value of β is becomes 8 because 8< ∞. • Β <= α is met ,the loop breaks and the subtree is pruned. 8 9 [9, 8] 9 8 [8, 8] 8 [8, ∞] 7 -1
  • 29.
    Working of Minimaxon a Tree. 8 8 6 8 [8, ∞] [-∞, 8] [8, ∞] Max Min Max Terminal (Min) • Min call for a state. • The Best Value is 8 from previous subtree. • The value of α is 8. • The Value of β is ∞. • Β <= α not met. 8 9 [9, 8] 9 8 [8, 8] 8 [8, ∞] 7 -1
  • 30.
    Sources: “Understanding Game Theoryin AI” Lecture by Dr. Ghulam Mustafa At Department of Information Technology "Research on Different Heuristics for Minimax Algorithm Insight from Connect-4 Game" written by Xiyu Kang, Yiqi Wang, Yanrui Hu, published by Journal of Intelligent Learning Systems and Applications, Vol.11 No.2, 2019 "Tic Tac Toe Super " App developed by M. Hassan Arshad at OrbitZero Studios.