Dt1akckmm Lesson 8 UCS 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

INTELLIGENT

SYSTEMS
UNINFORMED SEARCH ALGORITHM
➢ UNIFORM COST SEARCH (UCS)
UNIFORM COST SEARCH
• Is a type of BFS
• Is a searching algorithm used for traversing a weighted tree
or graph

• This algorithm comes into play when a different cost is


available for each edge.

• Its primary goal is to find a path to the goal node which has
the lowest cost.
VPath: S, A, C, D, B, G
Uniform-cost search
RFGN: S, A , C , G
Root Node: S s
Cost: 4 12
Goal Node: G 1

G 12 A 1
1 3
C 2 B 4
2 1

G 4 D 3

G 6
VPath: S, C, A, D, B, E
Uniform-cost search
RFGN: S, A, E
Root Node: S Cost: 30 S
Goal Node: e
10 10
20

C 10 B 20 A 10

40 20
5

E 50 D 15 E 30

30

E 45
VPath: S, 1, G
Uniform-cost search
RFGN: S,1 , G
Root Node: S Cost: 3 S
Goal Node: G 5 2

3 5 1 2

G 3
VPath: S, C, A, B, D, E, G
Uniform-cost search
RFGN: S,A,D,G S
Root Node: S Cost: 6
3 2
1
Goal Node: G
B 3 C 1 A 2

4 4 5 2

E 7 E 5 D 6 D
4
2
3

G
G 8 6
VPath: S, B, A, C, D, G
Uniform-cost search
RFGN: S,B,D,G
Root Node: S Cost: 6 S
Goal Node: G
2 3

B 2 A 3
2
3
5

C 4 D 5 D 8

4 3
1
G 8 D 7 G 6

You might also like