0% found this document useful (0 votes)
15 views

Adversarial Search

The document discusses adversarial search in the context of game-playing AI, highlighting the complexities introduced by unpredictable opponents and the need for strategic decision-making. It explains the game search problem, the minimax algorithm for optimal play, and the concept of Alpha-Beta pruning to improve efficiency in search algorithms. Key properties and conditions for Alpha-Beta pruning are also outlined, emphasizing its impact on search depth and computational relevance.

Uploaded by

sanamateen65
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Adversarial Search

The document discusses adversarial search in the context of game-playing AI, highlighting the complexities introduced by unpredictable opponents and the need for strategic decision-making. It explains the game search problem, the minimax algorithm for optimal play, and the concept of Alpha-Beta pruning to improve efficiency in search algorithms. Key properties and conditions for Alpha-Beta pruning are also outlined, emphasizing its impact on search depth and computational relevance.

Uploaded by

sanamateen65
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 19

Adversarial Search

1
Games vs. search problems

• "Unpredictable" opponent  specifying a move for


every possible opponent reply
• Time limits  unlikely to find goal, must approximate

2
Game search

• Game-playing programs developed by AI


researchers since the beginning of the modern AI era
– Programs playing chess, checkers, etc (1950s)
• Specifics:
– Sequences of player’s decisions we control
– Decisions of other player(s) we do not control
• Contingency problem: many possible opponent’s moves
must be “covered” by the solution
• Opponent’s behavior introduces uncertainty
• Rational opponent – maximizes its own utility (payoff)
function
3
Game Search Problem

• Problem formulation
– Initial state: initial board position + whose move it is
– Operators: legal moves a player can make
– Goal (terminal test): game over?
– Utility (payoff) function: measures the outcome of the game and
its desirability
• Search objective:
– Find the sequence of player’s decisions (moves)
maximizing its utility (payoff)
– Consider the opponent’s moves and their utility

4
Game tree (2-player, deterministic, turns)

5
O-MAX

X-MIN

6
Minimax

• Perfect play for deterministic games


• Idea: choose move to position with highest minimax value
= best achievable payoff against best play
• E.g., 2-ply game:



7
Minimax. Example

8
Complexity of the minimax algorithm

9
Solution to the complexity problem

• Alpha Beta pruning

10
Alpha Beta Pruning

• Some branches will never be played by rational players


since they include sub-optimal decisions for either player
• First, we will see the idea of Alpha Beta Pruning
• Then, we’ll introduce the algorithm for minimax with
alpha beta pruning, and go through the example again,
showing the book-keeping it does as it goes along

11
Properties of α-β

• Pruning does not affect final result

• Good move ordering improves effectiveness of pruning

• With "perfect ordering," time complexity = O(bm/2)


 doubles depth of search

• A simple example of the value of reasoning about which


computations are relevant (a form of metareasoning)


12
Key points in Alpha-beta Pruning
1.Alpha: Alpha is the best choice or the highest value that we
have found at any instance along the path of Maximizer. The
initial value for alpha is – ∞.
2.Beta: Beta is the best choice or the lowest value that we
have found at any instance along the path of Minimizer. The
initial value for alpha is + ∞.
3.The condition for Alpha-beta Pruning is that α >= β.
4.Each node has to keep track of its alpha and beta values.
Alpha can be updated only when it’s MAX’s turn and, similarly,
beta can be updated only when it’s MIN’s chance.
5.MAX will update only alpha values and MIN player will update
only beta values.
6.The node values will be passed to upper nodes instead of
values of alpha and beta during go into reverse of tree.
7.Alpha and Beta values only be passed to child nodes.
13
14
15
16
17
18
19

You might also like