Chapter 4
Chapter 4
If we have traversed this way, definitely our total path cost from S
to G is just 6 even after traversing through many nodes rather
than going to G directly where the cost is 12 and 6<<12(in terms
of step cost). But this may not work with all cases.
Uniform Cost Search algorithm
Advantages:
UCS is complete only if is no loop with zero or no
negative cost.
Disadvantages:
Explores options in every “direction”.
No information on goal location
Informed Search Algorithms
Here, the algorithms have information on the goal
state, which helps in more efficient searching. This
information is obtained by a heuristic.
In this section, we will discuss the following search
algorithms.
1.Greedy Search
2.A* Tree Search
Search Heuristics: In an informed search, a
heuristic is a function that estimates how close a
state is to the goal state.
Greedy Search algorithm
In greedy search, we expand the node closest to the
goal node.
The “closeness” is estimated by a heuristic h(x).
Heuristic:
A heuristic h is defined as-
h(x) = Estimate of distance of node x from the goal
node.
Lower the value of h(x), closer is the node from the
goal.
A->B 8 6 14
A->F 6 3 9
A->F->G 5 4 9
A->F->H 3 10 13
A->F->G->I 1 7 8
A->F->G->I- 0 10 10
>J
A->F->G->I- 3 12 15
>E
3 9 12
A->F->G->I-
>H