Download presentation
Presentation is loading. Please wait.
1
Adversarial Search and Game Playing Examples
2
Game Tree MAX’s play MIN’s play Terminal state (win for MAX) Here, symmetries have been used to reduce the branching factor MIN nodes MAX nodes
3
Game Tree MAX’s play MIN’s play Terminal state (win for MAX) In general, the branching factor and the depth of terminal states are large Chess: Number of states: ~10 40 Branching factor: ~35 Number of total moves in a game: ~100
4
Example: Tic-tac-Toe e(s) =number of rows, columns, and diagonals open for MAX number of rows, columns, and diagonals open for MIN 8 8 = 06 4 = 2 3 3 = 0
5
Backing up Values 6-5=1 5-6=-15-5=0 6-5=15-5=04-5=-1 5-6=-1 6-4=25-4=1 6-6=04-6=-2 -2 1 1 Tic-Tac-Toe tree at horizon = 2 Best move
6
Continuation 0 1 1 132112 1 0 110 020111 222312
7
Example
8
= 2 2 The beta value of a MIN node is an upper bound on the final backed-up value. It can never increase
9
Example The beta value of a MIN node is an upper bound on the final backed-up value. It can never increase 1 = 1 2
10
Example = 1 The alpha value of a MAX node is a lower bound on the final backed-up value. It can never decrease 1 = 1 2
11
Example = 1 1 = 1 2 = -1
12
Example = 1 1 = 1 2 = -1 Search can be discontinued below any MIN node whose beta value is less than or equal to the alpha value of one of its MAX ancestors Search can be discontinued below any MIN node whose beta value is less than or equal to the alpha value of one of its MAX ancestors
13
An example of Alpha-beta pruning 0 5-33 3 02-2 3 max min 0 0 0 -3 0 3 0 0
14
Final tree 0 5-33 3 02-2 3 max min Example of Alpha-beta pruning
15
An example of Alpha-beta pruning 05-325-232-3033-501-3501-5532-35
16
Example 05-325-232-3033-501-3501-5532-35 0
17
Example 05-325-232-3033-501-3501-5532-35 0 0
18
Example 05-325-232-3033-501-3501-5532-35 0 0
19
Example 05-325-232-3033-501-3501-5532-35 0 0
20
Example 05-325-232-3033-501-3501-5532-35 0 0 0
21
Example 05-325-232-3033-501-3501-5532-35 0 0 0 3 3
22
Example 05-325-232-3033-501-3501-5532-35 0 0 0 3 3
23
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0
24
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 5
25
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2
26
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2
27
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2
28
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2
29
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 0
30
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 5 0
31
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 1 1 0
32
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 1 1 0
33
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 1 1 0
34
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 1 1 1 1 0
35
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 1 1 1 1 -5 0
36
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 1 1 1 1 -5 0
37
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 1 1 1 1 -5 0
38
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 1 1 1 1 -5 0
39
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 1 1 1 1 -5 0 1
40
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 1 1 1 1 -5 2 2 2 2 1 1
41
Example 05-325-232-3033-501-3501-5532-35 0 0 0 0 3 3 0 2 2 2 2 1 1 1 1 -5 1 2 2 2 2 1
42
Nondeterminstic games are the games with both an element of chance and Add chance nodes to tree 2474605-2 0.5 Example with coin flip instead of dice
43
Example with coin flip instead of dice (cont.) 3 2 24 3 4 74 0 60 -2 5 0.5
44
44 Alpha-Beta prunning in Tic-Tac-Toe
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.