1
CS486/686 Lecture Slides (c) 2005 K. Larson and P. Poupart
1
Adversarial Search
CS 486 / 686 May 19, 2005 Univer sit y of Wat erloo
CS486/686 Lecture Slides (c) 2005 K. Larson and P. Poupart
2
I nt roduct ion
- So f ar we have st udied environment s
where t here is only a single-agent
- Today we look at what happens if we are
in a set t ing where t her e ar e mult iple agent s planning against each ot her
– Game t heory: zero sum games
CS486/686 Lecture Slides (c) 2005 K. Larson and P. Poupart
3
Out line
- Games
- Minimax search
- Evaluat ion f unct ions
- Alpha-bet a pruning
- Coping wit h chance
- Game programs
CS486/686 Lecture Slides (c) 2005 K. Larson and P. Poupart
4
Games
- Games are one of t he oldest , most well-st udied
domains in AI
- Why?
– They are f un – Games are usually easy t o represent and t he rules are clear – St at e spaces can be very large (so more challenging t han “t oy problems”)
- I n chess t he search t ree has ~10154 nodes
– Like t he “real world” in t hat decisions have t o be made and t ime is vit ally import ant – Easy t o det ermine when a program is doing well
- i.e. it wins
CS486/686 Lecture Slides (c) 2005 K. Larson and P. Poupart
5
Types of games
- Perf ect vs imperf ect inf or mat ion
– Perf ect inf o means t hat you can see t he ent ire st at e of t he game – Chess, checkers, ot hello, go,… – I mperf ect inf o games include scrabble, poker, most card games
- Det er minist ic vs st ochast ic
– Chess is det erminist ic – Backgammon is st ochast ic
CS486/686 Lecture Slides (c) 2005 K. Larson and P. Poupart
6
Games as search problems
- Consider a 2-player perf ect inf ormat ion game
– State: board conf igurat ion plus t he player who’s t urn it is t o move – Successor f unction: given a st at e ret urns a list of (move,st at e) pairs, indicat ing a legal move and t he result ing board – Terminal state: st at es where t here is a win/ loss/ draw – Utilit y f unct ion: assigns a numerical value t o t erminal st at es (e.g. I n chess +1 f or a win, -1 f or a loss, 0 f or a draw) – Solution: a st rat egy (way of picking moves) t hat wins t he game