ADVERSARIAL SEARCH
ADVERSARIAL SEARCH
Role of Adversarial Search in AI
TYPES OF GAMES IN AI
TYPES OF GAMES IN AI
Examples are chess, Checkers, Go, tic-tac-toe, etc.
Example: Backgammon, Monopoly, Poker, Ludo etc.
TYPES OF GAMES IN AI
Zero-Sum Game
TYPES OF GAMES IN AI
In this topic, we will discuss deterministic games, fully observable environment, zero-sum, and where each agent acts alternatively.
FORMALIZATION OF THE GAME PROBLEM:
A game can be formally defined with the following elements:
FORMALIZATION OF THE GAME PROBLEM:
GAME TREE:
GAME TREE:
Example: Tic-Tac-Toe game tree:
GAME �TREE:
GAME TREE:
•
From the initial state, MAX has 9 possible moves as he starts first. MAX place x and MIN place o, and both player plays alternatively until we reach a leaf node where one player has three in a row or all squares are filled.
Both players will compute each node, minimax, the minimax value which is the best achievable utility against an optimal adversary.
Suppose both the players are well aware of the tic-tac-toe and playing the best play. Each player is doing his best to prevent another one from winning. MIN is acting against Max in the game.
So in the game tree, we have a layer of Max, a layer of MIN, and each layer is called as Ply. Max place x, then MIN puts o to prevent Max from winning, and this game continues until the terminal node.
In this either MIN wins, MAX wins, or it's a draw. This game-tree is the whole search space of possibilities that MIN and MAX are playing tic-tac-toe and taking turns alternately.
•
•
•
•
OPTIMAL DECISIONS IN GAMES: MINI MAX ALGORITHM AND ΑLPHA –BETA PRUNING
MINIMAX ALGORITHM
▪
▪
▪
▪
▪
▪
▪
It is designed to minimize the possible loss in a worst-case scenario (hence "min") and maximize the potential gain (therefore "max").
In a two-player game, one player is the maximizer, aiming to maximize their score, while the other is the minimizer, aiming to minimize the maximizer's score.
The algorithm operates by evaluating all possible moves for both players, predicting the opponent's responses, and choosing the optimal move to ensure the best possible outcome.
There are two players MAX and MIN.
Players have an alternate turn and start with MAX. MAX maximizes the result of the game tree
MIN minimizes the result.
MINIMAX ALGORITHM
MINIMAX ALGORITHM
MINIMAX ALGORITHM
MINIMAX ALGORITHM
MINIMAX Example:
MINIMAX ALGORITHM
MINIMAX ALGORITHM
MINIMAX ALGORITHM
Limitations of the Mini-Max Algorithm
Despite its usefulness, the Mini-Max algorithm comes with limitations:
MINIMAX ALGORITHM
Applications of the Mini-Max Algorithm