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

Unit 2 - Adversarial Searching

The document discusses adversarial search in game playing, focusing on optimal decision-making and techniques like minimax and alpha-beta pruning. It highlights the challenges of game trees, particularly in complex games like chess, and the necessity of heuristic search procedures to improve decision-making efficiency. The properties and effectiveness of the minimax algorithm and alpha-beta pruning are also detailed, emphasizing their role in optimizing game strategy.

Uploaded by

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

Unit 2 - Adversarial Searching

The document discusses adversarial search in game playing, focusing on optimal decision-making and techniques like minimax and alpha-beta pruning. It highlights the challenges of game trees, particularly in complex games like chess, and the necessity of heuristic search procedures to improve decision-making efficiency. The properties and effectiveness of the minimax algorithm and alpha-beta pruning are also detailed, emphasizing their role in optimizing game strategy.

Uploaded by

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

Adversarial (do with conflict)

Search
Unit- 2
Game Playing
Outline
• Game domain
• Optimal decisions
• α-β pruning
Game domain
• Game playing can be achieve by machine
intelligence
• They provide structured task – easy to
measure success or failure
• They do not require large amount of
knowledge
• Can solvable by straightforward search to
solve from starting state to winning state
• Not true for all the games.
Contd…
• In the chess machine
• Average branching factor is 35
• In an average game each player might
make 50 moves
• In order to examine the complete game
tree, we would have to examine 35100
positions
• Therefore it is highly impossible to select a
move during the lifetime of the opponent
Solution
• Some kind of heuristic search procedure is
necessary
• Improve the generate procedure so that
only good moves (or paths) are generated
• Improve the test procedure so that the
best moves (or paths) will be recognized
and explored
• Minmax search procedure
• It is depth-first, depth-limited search
procedure.
Games vs. search problems
• "Unpredictable" opponent → specifying a
move for every possible opponent reply
• Time limits → unlikely to find goal, must
approximate
Optimal Decision in Games
• Initial state : which represented board
position and identifies the player to move
• Successor function : which returns a list of
(move , state) pairs. Legal move and
resulting state.
• Terminal state : which determine where
the game is over
• utility function : which gives numeric value
for the terminal states. (ex : +1,0,-1)
Game tree (2-player,
deterministic, turns)
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:
Minimax algorithm
Properties of minimax
• Complete? Yes (if tree is finite)

• Optimal? Yes (against an optimal opponent)

• Time complexity? O(bm)

• Space complexity? O(bm) (depth-first exploration)

• For chess, b ≈ 35, m ≈100 for "reasonable" games


→ exact solution completely infeasible

Alpha-Beta pruning
• In minmax search the number of game
states it has to examine is exponential in
the number of moves
• We can not eliminate exponent but we can
cut it in half
• It is possible to compute minmax without
looking at every node in the game tree.
• Alpha-beta pruning is helpful in that.
α-β pruning example
α-β pruning example
α-β pruning example
α-β pruning example
α-β pruning example
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
Why is it called α-β?
• α is the value of the
best (i.e., highest-
value) choice found
so far at any choice
point along the path
for max

• If v is worse than α,
max will avoid it

→ prune that branch

• Define β similarly for


min
The α-β algorithm
The α-β algorithm

You might also like