HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th...
Transcript of HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th...
![Page 1: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/1.jpg)
George F Luger
ARTIFICIAL INTELLIGENCE 6th edition
Structures and Strategies for Complex Problem Solving
HEURISTIC SEARCH
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
4.0 Introduction
4.1 An Algorithm for Heuristic Search
4.2 Admissibility, Monotonicity, and
Informedness
4.3 Using Heuristics I n Games
4.4 Complexity Issues
4.5 Epilogue and References
4.6 Exercises
1
![Page 2: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/2.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.1 First three levels of the tic-tac-toe state space reduced by symmetry
2
![Page 3: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/3.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.2 The “most wins” heuristic applied to the first children in tic-tac-toe.
3
![Page 4: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/4.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.3 Heuristically reduced state space for tic-tac-toe.
4
![Page 5: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/5.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.4 The local maximum problem for hill-climbing with 3-level look
ahead
5
![Page 6: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/6.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.5 The initialization stage and first step in completing the
array for character alignment using dynamic programming.
6
![Page 7: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/7.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.6 The completed array reflecting the maximum alignment information
for the strings.
7
![Page 8: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/8.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.7 A completed backward component of the dynamic programming
example giving one (of several possible) string alignments.
8
![Page 9: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/9.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.8 Initialization of minimum edit difference matrix between intention
and execution (adapted from Jurafsky and Martin, 2000).
9
![Page 10: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/10.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
10
![Page 11: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/11.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Intention
ntention delete I, cost 1
etention replace n with e, cost 2
exention replace t with x, cost 2
exenution insert u, cost 1
execution replace n with c, cost 2
Fig 4.9 Complete array of minimum edit difference between intention and execution
(adapted from Jurafsky and Martin, 2000) (of several possible) string alignments.
11
![Page 12: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/12.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
12
![Page 13: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/13.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.10 Heuristic search of a hypothetical state space.
13
![Page 14: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/14.jpg)
A trace of the execution of best_first_search for Figure 4.4
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
14
![Page 15: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/15.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.11 Heuristic search of a hypothetical state space with open and closed
states highlighted.
15
![Page 16: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/16.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.12 The start state, first moves, and goal state for an example-8 puzzle.
16
![Page 17: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/17.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.14 Three heuristics applied to states in the 8-puzzle.
17
![Page 18: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/18.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.15 The heuristic f applied to states in the 8-puzzle.
18
![Page 19: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/19.jpg)
The successive stages of open and closed that generate this graph are:
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
19
![Page 20: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/20.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.16 State space generated in heuristic search of the 8-puzzle graph.
20
![Page 21: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/21.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.17 Open and closed as they appear after the 3rd iteration of heuristic
search
21
![Page 22: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/22.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
22
![Page 23: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/23.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
23
![Page 24: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/24.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
24
![Page 25: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/25.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.18 Comparison of state space searched using heuristic search with space searched by
breadth-first search. The proportion of the graph searched heuristically is shaded.
The optimal search selection is in bold. Heuristic used is f(n) = g(n) + h(n) where
h(n) is tiles out of place.
25
![Page 26: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/26.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.19 State space for a variant of nim. Each state partitions the seven
matches into one or more piles.
26
![Page 27: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/27.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.20 Exhaustive minimax for the game of nim. Bold lines indicate
forced win for MAX. Each node is marked with its derived value
(0 or 1) under minimax.
27
![Page 28: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/28.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.21 Minimax to a hypothetical state space. Leafstates show heuristic
values; internal states show backed-up values.
28
![Page 29: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/29.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.22 Heuristic measuring conflict applied to states of tic-tac-toe.
29
![Page 30: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/30.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.23 Two-ply minimax applied to the opening move of tic-tac-toe, from
Nilsson (1971).
30
![Page 31: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/31.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.24 Two ply minimax, and one of two possible MAX second moves,
from Nilsson (1971).
31
![Page 32: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/32.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.25 Two-ply minimax applied to X’s move near the end of the game,
from Nilsson (1971).
32
![Page 33: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/33.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.26 Alpha-beta pruning applied to state space of Fig 4.21. States without
numbers are not evaluated.
33
![Page 34: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/34.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.27 Number of nodes generated as a function of branching factor,
B, for various lengths, L, of solution paths. The relating
equation is T = B(BL – 1)/(B – 1), adapted from Nilsson (1980).
34
![Page 35: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/35.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.28 Informal plot of cost of searching and cost of computing
heuristic evaluation against informedness of heuristic, adapted
from Nilsson (1980).
35
![Page 36: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/36.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.29 The sliding block puzzle.
36
![Page 37: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/37.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.30.
37
![Page 38: HEURISTIC SEARCHra100621/class/2017.1/IA...George F Luger ARTIFICIAL INTELLIGENCE 6th editionStructures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial](https://reader035.fdocuments.net/reader035/viewer/2022071415/610f73c58ae05133fc727a8b/html5/thumbnails/38.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 4.31.
38