Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
• Heuristics
• Greedy search search
• Best first search
• Try to explore the promising paths before the less promising path.
• Evaluation function: scores a node in the search tree according to
how close to the target state it seems to be(will just be a guess but
should b helpful)
• Heuristic Searching
•
Algorithm
1. Generate a possible solution.
2. Test to see if this is actually a solution.
3. Quit if a solution has been found.
Otherwise, return to step 1.
• Exhaustive generate-and-test.
• Heuristic generate-and-test: not consider
paths that seem unlikely to lead to a
solution.
• Plan generate-test:
- Create a list of candidates.
- Apply generate-and-test to that list.
15
AAPP002-4—2 Introduction to Artificial Intelligence Informed Search Slides 15 of 35
Best-first search
• Always removes the best node from the list i.e. the one
with the best score.
• The successors of the best node will be evaluated and
will be added to the list.
B:5 C:3
G:0
E 5 F 6 G 4 H 3 I 6 J 4
K 7 L 8 M 5 N 4 O 2 P 3 Q 7 R 4
• E to A
• h(E)=39
• h(D)=25 h(F)=47
• h(A)=0 h(C)=20 h(E)=39 h(F)=47
• -> Path = EDA
AAPP002-4—2 Introduction to Artificial Intelligence Informed Search Slides 27 of 35
Greedy Search in Symbolania (2)
• F to A
• h(F)=47
• h(D)=25 h(E)=39 h(G)=65
• h(A)=0 h(C)=20 h(E)=39 h(E)=39 h(F)=47 h(G)=65
• -> Path = FDA (optimal path is FEDA)
• Greedy search is not optimal
AAPP002-4—2 Introduction to Artificial Intelligence Informed Search Slides 28 of 35
Greedy Search in Symbolania (3)
• H to A
• h(H)=61
• h(I)=50 h(G)=65
• h(H)=61 h(G)=65
• h(I)=50 h(G)=65
• ...
• Greedy search is not complete
Q&A
• Hill Climbing