SlideShare a Scribd company logo
Informed Search
Outline
• Best-first search
• Greedy best-first search
• A* search
Search Heuristics
 A heuristic is:
 A function that estimates how close a state is to a goal
 Designed for a particular search problem
 Examples: Manhattan distance, Euclidean distance for
pathing
10
5
11.2
Example: Heuristic Function
Best-first search
• Idea: use an evaluation function f(n) for each node
• estimate of "desirability"
Expand most desirable unexpanded node
• Implementation:
Order the nodes in fringe in decreasing order of desirability
Best-first search
A
T S Z
118
140 75
Best-first search
A
T S Z
O
118
140 75
71
Best-first search
A
T S Z
S
O
118
140 75
71
151
Best-first search
A
T S Z
S
R F
O
118
140 75
71
151
90
80
Best-first search
A
T S Z
C
S
R F
O
P
118
140 75
71
151
90
80
97
146
Best-first search
A
T S Z
C
S
R F
O
P
C B
118
140 75
71
151
90
80
97
146
138 101
Best-first search
A
T S Z
C
S
R F
O
P
C B
118
140 75
71
151
90
80
97
146
138 101
Best-first search (DIY)
Properties of Best First Search
• Complete? No – can get stuck in loops
• Optimal? No
Difference between Uniform Cost Search and
Best First Search
• Uniform-cost search is uninformed search
• It doesn't use any domain knowledge.
• It expands the least cost node, and it does so in every direction because no information
about the goal is provided.
• Best-first search is informed search
• It uses a heuristic function to estimate how close the current state is to the goal.
Greedy best-first search
• Evaluation function f(n) = h(n) (heuristic)
= estimate of cost from n to goal
• e.g., hSLD(n) = straight-line distance from n to Bucharest
• Greedy best-first search expands the node that appears to be closest to goal
Greedy best-first search example
A 366
B 0
C 160
D 242
E 161
F 176
G 77
H 151
I 226
L 244
M 241
N 234
O 380
P 100
R 193
S 253
T 329
U 80
V 199
Z 374
Greedy best-first search example
A 366
B 0
C 160
D 242
E 161
F 176
G 77
H 151
I 226
L 244
M 241
N 234
O 380
P 100
R 193
S 253
T 329
U 80
V 199
Z 374
Greedy best-first search example
A 366
B 0
C 160
D 242
E 161
F 176
G 77
H 151
I 226
L 244
M 241
N 234
O 380
P 100
R 193
S 253
T 329
U 80
V 199
Z 374
Greedy best-first search example
A 366
B 0
C 160
D 242
E 161
F 176
G 77
H 151
I 226
L 244
M 241
N 234
O 380
P 100
R 193
S 253
T 329
U 80
V 199
Z 374
Greedy best-first search (DIY)
Properties of greedy best-first search
• Complete? No – can get stuck in loops
• Optimal? No
A* search
• Idea: avoid expanding paths that are already expensive
• Evaluation function f(n) = g(n) + h(n)
• g(n) = cost so far to reach n
• h(n) = estimated cost from n to goal
• f(n) = estimated total cost of path through n to goal
A* search example
A 366
B 0
C 160
D 242
E 161
F 176
G 77
H 151
I 226
L 244
M 241
N 234
O 380
P 100
R 193
S 253
T 329
U 80
V 199
Z 374
A* search example
A 366
B 0
C 160
D 242
E 161
F 176
G 77
H 151
I 226
L 244
M 241
N 234
O 380
P 100
R 193
S 253
T 329
U 80
V 199
Z 374
A* search example
A 366
B 0
C 160
D 242
E 161
F 176
G 77
H 151
I 226
L 244
M 241
N 234
O 380
P 100
R 193
S 253
T 329
U 80
V 199
Z 374
A* search example
A 366
B 0
C 160
D 242
E 161
F 176
G 77
H 151
I 226
L 244
M 241
N 234
O 380
P 100
R 193
S 253
T 329
U 80
V 199
Z 374
A* search example
A 366
B 0
C 160
D 242
E 161
F 176
G 77
H 151
I 226
L 244
M 241
N 234
O 380
P 100
R 193
S 253
T 329
U 80
V 199
Z 374
A* search example
A 366
B 0
C 160
D 242
E 161
F 176
G 77
H 151
I 226
L 244
M 241
N 234
O 380
P 100
R 193
S 253
T 329
U 80
V 199
Z 374
Admissible heuristics
• A heuristic h(n) is admissible if for every node n,
h(n) ≤ h*(n), where h*(n) is the true cost to reach the goal state from n.
• An admissible heuristic never overestimates the cost to reach the goal, i.e., it
is optimistic
• Example: hSLD(n) (never overestimates the actual road distance)
• Theorem: If h(n) is admissible, A* using TREE-SEARCH is optimal
Properties of A*
• Complete? Yes (unless there are infinitely many nodes with f ≤ f(G) )
• Space? Keeps all nodes in memory
• Optimal? Yes
A* search (DIY)
Video of Demo Contours UCS Empty
Video of Demo Contours (Empty) -- Greedy
Video of Demo Contours (Empty) – A*
Video of Demo Contours UCS Pacman Small Maze
Video of Demo Contours Greedy (Pacman Small
Maze)
Video of Demo Contours (Pacman Small
Maze) – A*
Comparison
Greedy Uniform Cost A*

More Related Content

PPT
Presentacion nro 1 redes y comunicaciones de datos
PPT
m4-heuristics.ppt
PPT
Ch2 3-informed (heuristic) search
PPTX
AI 22-23 Chpt3 informed.pptx
PDF
informed_search.pdf
PPTX
AI BEST FIRST,A-STAR,AO-STAR SEARCH.pptx
PPTX
Software Testing Part 3.pptx or black box tsting
PPTX
katalonstudiopresentation-221225172808-8179c016 (1).pptx
Presentacion nro 1 redes y comunicaciones de datos
m4-heuristics.ppt
Ch2 3-informed (heuristic) search
AI 22-23 Chpt3 informed.pptx
informed_search.pdf
AI BEST FIRST,A-STAR,AO-STAR SEARCH.pptx
Software Testing Part 3.pptx or black box tsting
katalonstudiopresentation-221225172808-8179c016 (1).pptx

Recently uploaded (20)

PPTX
web development for engineering and engineering
PPTX
Construction Project Organization Group 2.pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
composite construction of structures.pdf
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
Lecture Notes Electrical Wiring System Components
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
OOP with Java - Java Introduction (Basics)
web development for engineering and engineering
Construction Project Organization Group 2.pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
composite construction of structures.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Geodesy 1.pptx...............................................
Lecture Notes Electrical Wiring System Components
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
CH1 Production IntroductoryConcepts.pptx
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Foundation to blockchain - A guide to Blockchain Tech
Automation-in-Manufacturing-Chapter-Introduction.pdf
Internet of Things (IOT) - A guide to understanding
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Embodied AI: Ushering in the Next Era of Intelligent Systems
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
OOP with Java - Java Introduction (Basics)
Ad
Ad

Informed Search by the artificial intelligence

  • 2. Outline • Best-first search • Greedy best-first search • A* search
  • 3. Search Heuristics  A heuristic is:  A function that estimates how close a state is to a goal  Designed for a particular search problem  Examples: Manhattan distance, Euclidean distance for pathing 10 5 11.2
  • 5. Best-first search • Idea: use an evaluation function f(n) for each node • estimate of "desirability" Expand most desirable unexpanded node • Implementation: Order the nodes in fringe in decreasing order of desirability
  • 6. Best-first search A T S Z 118 140 75
  • 7. Best-first search A T S Z O 118 140 75 71
  • 8. Best-first search A T S Z S O 118 140 75 71 151
  • 9. Best-first search A T S Z S R F O 118 140 75 71 151 90 80
  • 10. Best-first search A T S Z C S R F O P 118 140 75 71 151 90 80 97 146
  • 11. Best-first search A T S Z C S R F O P C B 118 140 75 71 151 90 80 97 146 138 101
  • 12. Best-first search A T S Z C S R F O P C B 118 140 75 71 151 90 80 97 146 138 101
  • 14. Properties of Best First Search • Complete? No – can get stuck in loops • Optimal? No
  • 15. Difference between Uniform Cost Search and Best First Search • Uniform-cost search is uninformed search • It doesn't use any domain knowledge. • It expands the least cost node, and it does so in every direction because no information about the goal is provided. • Best-first search is informed search • It uses a heuristic function to estimate how close the current state is to the goal.
  • 16. Greedy best-first search • Evaluation function f(n) = h(n) (heuristic) = estimate of cost from n to goal • e.g., hSLD(n) = straight-line distance from n to Bucharest • Greedy best-first search expands the node that appears to be closest to goal
  • 17. Greedy best-first search example A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 R 193 S 253 T 329 U 80 V 199 Z 374
  • 18. Greedy best-first search example A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 R 193 S 253 T 329 U 80 V 199 Z 374
  • 19. Greedy best-first search example A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 R 193 S 253 T 329 U 80 V 199 Z 374
  • 20. Greedy best-first search example A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 R 193 S 253 T 329 U 80 V 199 Z 374
  • 22. Properties of greedy best-first search • Complete? No – can get stuck in loops • Optimal? No
  • 23. A* search • Idea: avoid expanding paths that are already expensive • Evaluation function f(n) = g(n) + h(n) • g(n) = cost so far to reach n • h(n) = estimated cost from n to goal • f(n) = estimated total cost of path through n to goal
  • 24. A* search example A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 R 193 S 253 T 329 U 80 V 199 Z 374
  • 25. A* search example A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 R 193 S 253 T 329 U 80 V 199 Z 374
  • 26. A* search example A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 R 193 S 253 T 329 U 80 V 199 Z 374
  • 27. A* search example A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 R 193 S 253 T 329 U 80 V 199 Z 374
  • 28. A* search example A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 R 193 S 253 T 329 U 80 V 199 Z 374
  • 29. A* search example A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 R 193 S 253 T 329 U 80 V 199 Z 374
  • 30. Admissible heuristics • A heuristic h(n) is admissible if for every node n, h(n) ≤ h*(n), where h*(n) is the true cost to reach the goal state from n. • An admissible heuristic never overestimates the cost to reach the goal, i.e., it is optimistic • Example: hSLD(n) (never overestimates the actual road distance) • Theorem: If h(n) is admissible, A* using TREE-SEARCH is optimal
  • 31. Properties of A* • Complete? Yes (unless there are infinitely many nodes with f ≤ f(G) ) • Space? Keeps all nodes in memory • Optimal? Yes
  • 33. Video of Demo Contours UCS Empty
  • 34. Video of Demo Contours (Empty) -- Greedy
  • 35. Video of Demo Contours (Empty) – A*
  • 36. Video of Demo Contours UCS Pacman Small Maze
  • 37. Video of Demo Contours Greedy (Pacman Small Maze)
  • 38. Video of Demo Contours (Pacman Small Maze) – A*

Editor's Notes

  • #23: Not complete since going for Iasi to Fagaas > the algorithm will never find the solution Iasi-> Vaslui -> Urziceni -> Bucharest -> Fagaras
  • #31: Conditions for optimality: Admissibility and consistency Consistency (monotonocity) is slightly stronger than admissibility Every consistent heuristic is also admissible.