1 adversarial search cs 171/271 (chapter 6) some text and images in these slides were drawn from...

13
1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

Upload: kerrie-lamb

Post on 03-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

1

Adversarial Search

CS 171/271(Chapter 6)

Some text and images in these slides were drawn fromRussel & Norvig’s published material

Page 2: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

2

Games Multi-agent environment

Agent needs to consider actions of other agents

Games: Adversarial Search Problems Considerations

Many possible moves of other player Time (need to optimize, or approximate)

Page 3: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

3

Game as a Search Problem Initial State Successor Function

Note the turn-taking aspect (“ply”) Terminal test

“Goal”: game over (leaf nodes) Utility Function

Score or outcome (examples?)

Page 4: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

4

Game Tree

Page 5: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

5

Infallible Opponent Assumption

Strategy: select the best move that assumes the your opponent will make the best play Need to consider all possible opponent moves

Minimax value of a node in the game tree Leaf node: minimax value = utility value Agent (called MAX) picks a move that results in

a state with maximum utility; minimax value of the node is that maximum

Opponent picks the move that minimizes utility for the agent; minimax value of the node is that minimum

Page 6: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

6

Minimax Values

Page 7: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

7

Minimax Algorithm

Page 8: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

8

α-β (alpha-beta) Pruning May skip examination of some nodes If a node has no impact on the min/max

choice at upper levels, prune that node Need to maintain

α -> highest valued choice so far along path for MAX

β -> lowest valued choice so far along path for MIN

Page 9: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

9

α-β pruning: omit examination of these nodes;Minimum of 2 cannot yield a maximum higher than 3

Page 10: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

10

About α-β pruning Effectiveness is highly dependent

on order in which successors are examined

Can reduce effective tree depth to half its value

Page 11: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

11

Other Considerationsin Games Because of time constraints, may

have to settle with estimate of utility (evaluation function) Non-terminal nodes turned into

leaves Elements of chance

e.g., dice and cards Min, max, and chance nodes

Page 12: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

12

State of the Art Checkers: Chinook ended 40-year-reign of

human world champion Marion Tinsley in 1994. Used a precomputed endgame database defining perfect play for all positions involving 8 or fewer pieces on the board, a total of 444 billion positions.

Chess: Deep Blue defeated human world champion Garry Kasparov in a six-game match in 1997. Deep Blue searches 200 million positions per second, uses very sophisticated evaluation, and undisclosed methods for extending some lines of search up to 40 ply.

Page 13: 1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material

13

State of the Art Othello: human champions refuse to

compete against computers, who are too good.

Go: human champions refuse to compete against computers, who are too bad. In go, b > 300, so most programs use pattern knowledge bases to suggest plausible moves.