Uniform Cost Search - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Uniform Cost Search

Description:

Uniform Cost Search (UCS) minimises the cost of the path so far, g(n) ... Expanding Concentric Circles. Expansion is outwards from initial state ... – PowerPoint PPT presentation

Number of Views:2273
Avg rating:3.0/5.0
Slides: 9
Provided by: scie205
Category:

less

Transcript and Presenter's Notes

Title: Uniform Cost Search


1
Uniform Cost Search
  • G51IAI Introduction to AI
  • 2006-2007

2
What is Uniform Cost Search?
  • Uniform Cost Search (UCS) minimises the cost of
    the path so far, g(n).
  • UCS is implemented by expanding the node with
    the lowest path cost. As previous animations have
    shown, this search pattern is both optimal and
    complete, but can be very inefficient.

3
Implementation
  • g(n) gives the path cost from the start node to
    node n
  • Given the above, we implement UCS as follows.
  • Function UCS(problem) returns a solution or
    failure     Return BEST-FIRST-SEARCH(problem, g
    )
  • This strategy is optimal and complete

4
Remark
  • To stop the animation getting overly complicated
    I removed the Oradea-Sibiu edge

5
Study this map of Romania. Note the distances
between cities and try and calculate the shortest
route between Sibiu and Bucharest. Then press
space to see the optimal route marked in red.
The optimal route between the two cities takes us
through Rimnicu and Pitesti. Press space to
continue with the slideshow.
Neamt
Oradea
71
Zerind
87
Iasi
75
92
Arad
Optimal route is (8097101) 278 miles
140
140
Vaslui
118
99
Faragas
Sibiu
Sibiu
Timisoara
142
80
80
111
211
Rimnicu
Lugoj
98
Rimnicu
Urziceni
Hirsova
86
70
97
97
Pitesti
Pitesti
Mehadia
146
101
101
Bucharest
86
75
138
Dobreta
90
Craiova
120
Eforie
Giurgui
6
UCS in action
  • Having established the optimal path between the
    two towns of Arad and Bucharest we can now test
    the efficiency of the UCS search pattern in
    finding the same goal state.

7
ANIMATION OF UCS.
Nodes Expanded
1.Sibiu
2.Rimnicu
3.Faragas
4.Arad
5.Pitesti
6.Zerind
7.Craiova
8.Timisoara
Neamt
9.Bucharest 278 GOAL!!
286
215
Oradea
71
Zerind
87
Iasi
Fringe in RED with g Visited in BLUE
75
140
92
Arad
Optimal route is (8097101) 278 miles
140
140
Vaslui
99
118
99
Faragas
Sibiu
Timisoara
142
258
80
111
80
211
Rimnicu
Lugoj
98
Urziceni
Hirsova
369
177
86
70
97
Pitesti
Mehadia
146
101
Bucharest
86
75
138
310 (F)
Dobreta
278 (R,P)
90
226 (R)
Craiova
120
336
Eforie
Giurgui
315 (R,P)
8
Search Pattern
  • Expanding Concentric Circles
  • Expansion is outwards from initial state
  • Expansion ignores the goal
Write a Comment
User Comments (0)
About PowerShow.com