











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!












CS613 INTRODUCTION TO
ARTIFICIAL INTELLIGENCE
Game Playing: Adversarial Search
Introduction
Different kinds of games:
Chess, Checkers Go, Othello
Backgammon, Monopoly
Battleship Bridge, Poker,Scrabble,
Deterministic Chance
Perfect Information
Imperfect
Information
Games with perfect information. No randomness is involved.
Games with imperfect information. Random factors are part of the game.
Game Playing: Adversarial Search
Traditional (single agent) search methods only consider how close the agent is to the goal state (e.g. best first search).
In two player games, decisions of both agents have to be taken into account: a decision made by one agent will affect the resulting search space that the other agent would need to explore.
Question: Do we have randomness here since the decision made by the opponent is NOT known in advance?
No. Not if all the moves or choices that the opponent can make are finite and can be known in advance.
Partial game tree for Tic-Tac-Toe
Idea : MAX chooses the board with the max utility value, MIN the minimum.
Chess, checkers, go, Mancala, Tic-Tac-Toe,
Othello, Nim, …
Two players alternate moves
Zero-sum: one player’s loss is another’s gain
Perfect Information: each player knows the entire
game state
Deterministic: no element of chance
Clear set of legal moves
Well-defined outcomes (e.g. win, lose, draw)
Two players: A and B
A moves first and they take turns until the game is over. Winner gets award, loser gets penalty.
Games as search:
A uses search tree to determine next move.
How to Play a Game by Searching
General Scheme
Key problems
Hexapawn is played on a chessboard cut down to
3x3 squares. A player can
A player P 1 wins the game agains P 2 when:
White moves
When I move, I attempt to MAXimize my performance.
When my opponent moves, he or she attempts to MINimize my performance. TO REPRESENT THIS:
If we move first, label the root MAX; if our opponent does, label it MIN.
Alternate labels for each successive tree level.
Evaluations how good a ‘board position’ is
Zero-sum assumption lets us use one function to
describe goodness for both players.
Build using expert knowledge,
f(n)=6-4=
f(n)=6-6=
f(n)=4-4=
f(n)=4-3=1 (^) f(n)=4-3=1 f(n)=4-2=
f(n)=2 f(n)=2 f(n)=2 f(n)=2 f(n)=2 f(n)=2 f(n)=2 f(n)=
f(n)=0 f(n)=
f(n)=# of potential three-lines for X –
not terminal f(n)=0 if n is a terminal tie f(n)=+ ∞ if n is a terminal win f(n)=- ∞ if n is a terminal loss