cs.462 artificial intelligence
DESCRIPTION
CS.462 Artificial Intelligence. SOMCHAI THANGSATHITYANGKUL Lecture 03 : Search (2). Uniform Cost Search (UCS). Uniform Cost Search: Nodes in agenda keep track of total path length from start to that node Agenda kept in priority queue ordered by path length Get shortest path in queue. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/1.jpg)
CS.462Artificial Intelligence
SOMCHAI THANGSATHITYANGKUL
Lecture 03 : Search (2)
![Page 2: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/2.jpg)
2
Uniform Cost Search (UCS)
• Uniform Cost Search:– Nodes in agenda keep track of total
path length from start to that node– Agenda kept in priority queue ordered
by path length– Get shortest path in queue
![Page 3: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/3.jpg)
3
Uniform Cost Search (UCS)
Graph:
2
![Page 4: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/4.jpg)
4
UCSAgenda:
Expand node Nodes list
s
{s}
{Bs :2,Cs:4 ,As:5 }
![Page 5: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/5.jpg)
5
Try thisFind a path from node A to the goal
node B. Use UCS method.
AB
Z
OS F
C
PR
T L MD
118
75
71 151
140
111 70 75
120
90
99
211
97
146 138
101
![Page 6: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/6.jpg)
UCS
6
S140 O146 L229
A
T118 S140 O146
Z75 T118 S140A
B
ZO
S F
C
PR
T L MD
118
75
71 151
140
111 7075
120
90
99
211
97
146 138
101
![Page 7: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/7.jpg)
7
Informed Search
• If we use uniform cost search on this graph
What’s wrong ?
![Page 8: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/8.jpg)
8
Informed Search
• Informed Search or Heuristic Search methods try to estimate the “distance” to a goal state. A heuristic function h(s) is the estimated distance to the goal state.
• - Best first greedy search - use h(s) instead of g(s) - Always expand the node with the least h(s) - Use a priority queue: - - Push in states with their second half cost h(s)
Pop out the state with the least h(s) first.
![Page 9: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/9.jpg)
9
- Best first greedy search
Graph:
![Page 10: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/10.jpg)
10
- Best first greedy searchAgenda:
Expand node Nodes list
s
{s:13}
{Bs:10, As:12,Cs :15 }
![Page 11: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/11.jpg)
11
Try thisUse Best first greedy search path from Arad to Buchraest
![Page 12: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/12.jpg)
12
A* Search
![Page 13: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/13.jpg)
13
A* Search
• Evaluation function f(n)= g(n)+h(n)– g(n) the cost (from the start) to reach th
e node n.– h(n) estimated cost to get from the nod
e n to the goal.– f(n) estimated total cost of path throug
h n to goal.
![Page 14: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/14.jpg)
14
A* Search
Graph:
![Page 15: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/15.jpg)
15
A* Search
Agenda:
Expand node Nodes list
s
{s:13}
{Bs:12, As:17,Cs :19 }
![Page 16: CS.462 Artificial Intelligence](https://reader035.vdocuments.us/reader035/viewer/2022062722/568139c4550346895da16acf/html5/thumbnails/16.jpg)
16
Try thisUse A* search path from Arad to Buchraest