Adversarial search
Adversarial search
• Adversarial search is a technique used in competitive environments
where two or more agents have conflicting goals, typically in the context
of games.
• Unlike single-agent search, where an agent aims to find the optimal path
to a goal, adversarial search involves anticipating and responding to an
opponent's moves.
Key characteristics and concepts of adversarial search
include:
•Competitive Environment:
•It is applied in scenarios where agents compete, often in zero-
sum games where one agent's gain is another's loss, such as
chess or tic-tac-toe.
•Game Tree:
•Adversarial search problems are often represented as a game
tree, where nodes represent game states and edges represent
possible moves.
•The tree alternates between moves by different players.
•Minimax Algorithm:
•It aims to find the optimal move for a player by assuming the
opponent will also play optimally to minimize the first player's
utility (or maximize their own).
•It recursively evaluates the utility of terminal states and
propagates these values up the game tree.
•Alpha-Beta Pruning:
•An optimization of the minimax algorithm that significantly
reduces the search space.
•It prunes branches of the game tree that are determined not to
affect the final decision, without needing to fully explore them.
•Evaluation Functions:
•For games with large search spaces where exploring the entire
game tree is infeasible, heuristic evaluation functions are used
to estimate the utility of non-terminal states, allowing for a
limited-depth search.
•Applications:
•Widely used in game-playing AI, but also applicable in other
competitive domains like cybersecurity, finance, and strategic
planning.
Minimax algorithm
•The Minimax algorithm is claimed to be a recursive or
backtracking algorithm that is responsible for choosing the best
optimal move in the conflicting environment. The Minimax
algorithm operates on a tree structure known as the game
tree, which is the collection of all the possible moves in the
corresponding game states in a given game.
•The game tree’s leaf node accommodates all the possible
moves. The game state denotes the current board condition.
With every single move, the game state changes and the game
tree gets updated height-wise. When visualized, this game tree
often resembles an inverted tree, with the root representing
the current game state and the branches representing possible
moves.
•This algorithm simply works by proceeding down to the tree
until it reaches the leaf node and then it backs up the minimax
values through the tree as the recursion unwinds. The prime
motive of the Minimax algorithm is to maximize the chance of
winning for the maximizer. In the game tree, every node is
assigned weights that influence the chances of winning, the
higher the weights, the higher the chances of winning.
Key terminologies in the Minimax algorithm
• Minimax Tree: A tree structure shows all possible moves and game
states in a game, used by Minimax to find the best move.
• MAX (Maximizer) - Maximizer seeks favorable outcomes in games
by maximizing chances of winning for themselves as players.
• MIN (Minimizer) - Minimizer reduces winning chances, making
moves leading to least favorable outcome for the Maximizer in
games.
•Initial state - Starting state of game board, representing the
configuration at the beginning of the game.
•Terminal state -Terminal states are the final outcomes of a
game board, resulting in either a win, loss, or draw.
•Heuristic Evaluation Function: Function evaluates game states
for maximizer, assigning numerical values to each game state
based on piece positions, material advantage, and board
control.
How Minimax search algorithm help in finding the optimal strategy?
•Terminal state: The Minimax value of each state in the game
tree can be used to determine the optimal strategy. The
MINIMAX(s) refers to the utility of being in that state that
assumes both players play optimally from there to the end of
the game.
Non-terminal state: In the case of the non-terminal state, when
MAX's turn arrives at the game, MAX aims to move which leads
to a state of maximum value, conversely MIN prefers to choose
the move that leads to a state of minimum value. It can be
formulated as:
Adversarial search in artificial intelligence
Adversarial search in artificial intelligence
Adversarial search in artificial intelligence
Adversarial search in artificial intelligence
Adversarial search in artificial intelligence

Adversarial search in artificial intelligence

  • 1.
  • 2.
    Adversarial search • Adversarialsearch is a technique used in competitive environments where two or more agents have conflicting goals, typically in the context of games. • Unlike single-agent search, where an agent aims to find the optimal path to a goal, adversarial search involves anticipating and responding to an opponent's moves.
  • 3.
    Key characteristics andconcepts of adversarial search include: •Competitive Environment: •It is applied in scenarios where agents compete, often in zero- sum games where one agent's gain is another's loss, such as chess or tic-tac-toe.
  • 4.
    •Game Tree: •Adversarial searchproblems are often represented as a game tree, where nodes represent game states and edges represent possible moves. •The tree alternates between moves by different players.
  • 5.
    •Minimax Algorithm: •It aimsto find the optimal move for a player by assuming the opponent will also play optimally to minimize the first player's utility (or maximize their own). •It recursively evaluates the utility of terminal states and propagates these values up the game tree.
  • 6.
    •Alpha-Beta Pruning: •An optimizationof the minimax algorithm that significantly reduces the search space. •It prunes branches of the game tree that are determined not to affect the final decision, without needing to fully explore them.
  • 7.
    •Evaluation Functions: •For gameswith large search spaces where exploring the entire game tree is infeasible, heuristic evaluation functions are used to estimate the utility of non-terminal states, allowing for a limited-depth search.
  • 8.
    •Applications: •Widely used ingame-playing AI, but also applicable in other competitive domains like cybersecurity, finance, and strategic planning.
  • 9.
    Minimax algorithm •The Minimaxalgorithm is claimed to be a recursive or backtracking algorithm that is responsible for choosing the best optimal move in the conflicting environment. The Minimax algorithm operates on a tree structure known as the game tree, which is the collection of all the possible moves in the corresponding game states in a given game.
  • 10.
    •The game tree’sleaf node accommodates all the possible moves. The game state denotes the current board condition. With every single move, the game state changes and the game tree gets updated height-wise. When visualized, this game tree often resembles an inverted tree, with the root representing the current game state and the branches representing possible moves.
  • 11.
    •This algorithm simplyworks by proceeding down to the tree until it reaches the leaf node and then it backs up the minimax values through the tree as the recursion unwinds. The prime motive of the Minimax algorithm is to maximize the chance of winning for the maximizer. In the game tree, every node is assigned weights that influence the chances of winning, the higher the weights, the higher the chances of winning.
  • 12.
    Key terminologies inthe Minimax algorithm • Minimax Tree: A tree structure shows all possible moves and game states in a game, used by Minimax to find the best move. • MAX (Maximizer) - Maximizer seeks favorable outcomes in games by maximizing chances of winning for themselves as players. • MIN (Minimizer) - Minimizer reduces winning chances, making moves leading to least favorable outcome for the Maximizer in games.
  • 13.
    •Initial state -Starting state of game board, representing the configuration at the beginning of the game. •Terminal state -Terminal states are the final outcomes of a game board, resulting in either a win, loss, or draw. •Heuristic Evaluation Function: Function evaluates game states for maximizer, assigning numerical values to each game state based on piece positions, material advantage, and board control.
  • 14.
    How Minimax searchalgorithm help in finding the optimal strategy? •Terminal state: The Minimax value of each state in the game tree can be used to determine the optimal strategy. The MINIMAX(s) refers to the utility of being in that state that assumes both players play optimally from there to the end of the game.
  • 15.
    Non-terminal state: Inthe case of the non-terminal state, when MAX's turn arrives at the game, MAX aims to move which leads to a state of maximum value, conversely MIN prefers to choose the move that leads to a state of minimum value. It can be formulated as: