Artificial Intelligence 5. Game Playing: Course V231 Department of Computing Imperial College © Simon Colton
Artificial Intelligence 5. Game Playing: Course V231 Department of Computing Imperial College © Simon Colton
5. Game Playing
Course V231
Department of Computing
Imperial College
Simon Colton
Zero
sum game
Getting
Search for
Opponent
Move 1
Moves
Board State 2
Search for
Opponent
Move 3
Moves
Board State 4
Board State 3
Board State 5
Lookahead Search
If
Or
If
Etc.
Minimax Search
Like
Each
Method:
Choose
Moving a score
when theres a choice
Rational choice for the player below the number youre moving
For
Cutoff Search
Must
Draw
Put
Evaluation Functions
Must
goal states
Example
in chess
Black has:
Score = 1*(5)+3*(1)+5*(2)
= 5+3+10 = 18
White has:
5 pawns, 1 rook
Score = 1*(5)+5*(1)
= 5 + 5 = 10
Overall scores for this board state:
black = 18-10 = 8
white = 10-18 = -8
Evaluation
problem
Possible
solution
Non-quiescent
search
Pruning
Want
Alpha-beta
pruning
player 1
Pr
un
e
player 2
Example:
In
backgammon
these cases
We can no longer calculate guaranteed scores
We can only calculate expected scores
Using
probability to guide us
Expectimax Search
Going
More interesting
(but still trivial) game
Deal
Player
Expectimax Diagram
Expectimax Calculations
played perfectly:
Games
played well:
Games
played badly:
Philosophical Questions
Drew McDermott:
"Saying Deep Blue doesn't really think about chess is like saying
an airplane doesn't really fly because it doesn't flap its wings