Introduction to Artificial Intelligence CS 438 Spring 2008
description
Transcript of Introduction to Artificial Intelligence CS 438 Spring 2008
Introduction to Artificial Intelligence
CS 438 Spring 2008• Today
– AIMA, Ch. 6– More Adversarial
Search
• Next Tuesday– AIMA, Ch. 13– Reasoning with
Uncertainty
SOE Open House
• Schedule
• EB 2029
• Activity– Man vs Machine Reversi– Class folder
• Open House
Assignment 3: Game Playing
• It Tourney Time!
Minimax Recap
α-β pruning• Strategy
– Any path that is being expanded that is clearly worse than any known path can be abandoned early.
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
–•
α-β pruning
• α (alpha): Best choice for max• β (beta): Best choice for min
if maxChoice >= β then prune
if minChoice <= α then prune
α-β pruning example
α-β pruning example
if maxChoice >= β then prune
if minChoice <= α then prune
α-β pruning example
if maxChoice >= β then prune
if minChoice <= α then prune
α-β pruning example
if maxChoice >= β then prune
if minChoice <= α then prune
α-β pruning example
if α >= β then prune
if β <= α then prune
The α-β algorithm
The α-β algorithm
How many states can be avoided?
• It depends on the order states are generated in– If the best moves for each player are
generated first then significant pruning can occur
– If the worst moves are generated first then NO pruning can occur