DDAIS Adversarial Search
DDAIS Adversarial Search
DDAIS
Session -7
• Utility values for each agent are the opposite of the other
• creates the adversarial situation
• Games – adversary
• Solution is strategy (strategy specifies move for every possible opponent reply).
• Optimality depends on opponent. Why?
• Time limits force an approximate solution
• Evaluation function: evaluate “goodness” of game position
• Examples: chess, checkers, Othello, backgammon
Types of Games
• MAX moves first and they take turns until the game is over
• Winner gets award, loser gets penalty.
• Games as search:
• Initial state: e.g. board configuration of chess
• Successor function: list of (move,state) pairs specifying legal moves.
• Terminal test: Is the game finished?
• Utility function: Gives numerical value of terminal states. E.g. win (+1), lose (-1) and draw (0) in tic-tac-
toe or chess
Size of search trees
• b = branching factor
• Chess
• b ~ 35
• D ~100
- search tree is ~ 10 154 (!!)
- completely impractical to search this
• Game-playing emphasizes being able to make optimal decisions in a finite amount of time
• Somewhat realistic as a model of a real-world agent
• Even if games themselves are artificial
Partial Game Tree for Tic-Tac-Toe
Game tree (2-player, deterministic, turns)
v∞
v MIN(v,MAX-VALUE(s))
Example-1
Cont…
Cont…
Example-2
Example-3
End of Session
Thank you