Download presentation
Published byShanon Knight Modified over 7 years ago
1
Artificial Intelligence AIMA §5: Adversarial Search
Rodney Nielsen Many / most of these slides were adapted from: AI MA, Russell and Norvig
2
Adversarial Search Games Perfect Play
Minimax algorithm α-β pruning Resource limits and approximate evaluation Games of chance Games of imperfect information
3
Games vs. Search Problems
Unpredictable Opponent Solution is a strategy specifying a move for every possible opponent reply Time limits unlikely to find goal, must approximate
4
Types of Games Deterministic Chance Perfect Information
Chess, Checkers, Go, Othello Backgammon, Monopoly Imperfect Information Battleship, Blind TicTacToe Bridge, Poker, Scrabble, Nuclear War
5
Game tree (2-player, deterministic, turns)
6
Minimax Perfect play for deterministic, perfect-information games
Idea: choose move to position with highest minimax value = best achievable payoff against opponent’s best play E.g., 2-ply game:
7
Minimax Algorithm
8
Properties of Minimax Complete? Optimal? Search type?
Yes, if tree is finite Optimal? Yes, against an optimal opponent. Otherwise? Search type? Depth-first exploration Complexity? Time: O(bm) Space: O(bm) For chess, b≈35 for “reasonable” games Exact solution completely infeasible But do we need to explore every path?
9
α-β Pruning
10
α-β Pruning X ≥ -∞ ≥ -∞ ≤ 3 ≤ 3 ≥ 3 ≥ 3 ≤ 3 ≤ 3 ≤ 2 ≥ 3 ≥ 3 ≤ 3 ≤ 2
≤ 14 ≤ 3 ≤ 2 ≤ 2
11
Game Objective Function
Utility Functions Defn: Zero-sum game
12
α-β Pruning Efficiency / Space and Time Complexity Move ordering
Killer moves Transposition table Heuristic evaluation function
13
Move Ordering X ≥ -∞ ≥ -∞ ≤ 3 ≤ 3 ≥ 3 ≥ 3 ≤ 3 ≤ 3 ≤ 2 ≥ 3 ≥ 3 ≤ 3 ≤ 2
≤ 14 ≤ 3 ≤ 2 ≤ 2
14
Move Ordering Move ordering Transposition table Killer moves
Need to avoid repeated evaluation (as in state space searches)
15
Heuristic Evaluation Functions
Estimates the expected utility value Instead of calculating exact utility Based on probabilities Chess example (two pawns versus one): 72% wins, 20% losses, and 8% draws f = 0.72* * *½ = 0.76 Order terminal states same as utility function Use exact utility at terminal states
16
Heuristic Evaluation Functions
Use features of non-terminal state to estimate utility Creates equivalence classes Often a weighted linear function of features Eval(s) = w1f1(s) + w1f1(s) + … + wdfd(s) Examples Chess features ? Sweep Fives features
17
Cutting Off Search if Cutoff-Test(state, depth) return Eval(state)
When should you cut off the search Depth Quiescence
18
Cutting Off Search When should you cut off the search Depth Quiescence
Horizon Effect
19
Forward Pruning Beam Search
Only explore best n moves past a certain depth
20
Search versus Lookup Pre-compute and store the best move and its value for some states
21
Stochastic Games What to do when future states are based on a stochastic process? Calculate the expected value Based on an exhaustive evaluation, or Based on Monte Carlo simulation
22
Partially Observable Games
Belief States Monte Carlo Simulations - again
23
State-of-the-Art Chess Checkers Othello Poker Go Bridge?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.