0% found this document useful (0 votes)
369 views3 pages

Search Techniques in AI

Depth limited search is an uninformed search that uses depth-first search with a predetermined depth limit. It can terminate with failure if no solution is found within the depth limit. Greedy best-first search is an informed search that expands the node closest to the goal based on an estimated heuristic cost function. It tends to find good solutions quickly but may not be optimal or complete.

Uploaded by

Bhuvan Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
369 views3 pages

Search Techniques in AI

Depth limited search is an uninformed search that uses depth-first search with a predetermined depth limit. It can terminate with failure if no solution is found within the depth limit. Greedy best-first search is an informed search that expands the node closest to the goal based on an estimated heuristic cost function. It tends to find good solutions quickly but may not be optimal or complete.

Uploaded by

Bhuvan Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Explain the following search techniques with example for each.

(A) Depth limited search

(B) Greedy Best First Search

(A) Depth limited search(Un-informed search)

i. A depth-limited search algorithm is similar to depth-first search but with a predetermined limit.
ii. In this we enqueue nodes in LIFO (last-in, first-out) order. But limit depth to L.
iii. Depth-limited search can solve the drawback of the infinite path in the Depth-first search.
iv. In this algorithm, the node at the depth limit will treat as it has no successor nodes further.
v. Depth-limited search can be terminated with two Conditions of failure:
o Standard failure value: It indicates that problem does not have any solution.
o Cutoff failure value: It defines no solution for the problem within a given depth limit.

vi. The above figure shows the implementation of the DLS algorithm. Node A is at Limit = 0, followed
by nodes B, C, D, and E at Limit = 1 and nodes F, G, and H at Limit = 2. Our start state is considered
to be node A and our goal state is node H. To reach node H we apply DLS.
vii. So in the first case we set our limit to 0 and search for the goal. Since limit 0, the algorithm will
assume that there are no children after limit 0 even if nodes exist further. Now, if we implement it
we will traverse only node A as there is only one node in limit 0, which is basically our goal state.
viii. Now since we were not able to find the goal we increase our limit to 1 and apply DFS till limit 1
even though there are further nodes after limit 1. But those nodes aren’t expanded as we have set
our limit as 1.
ix. Hence nodes A followed by B, C, D, and E are expanded as the mentioned order. Then we again
increase our limit from 1 to 2 in the notion to find the goal.
x. Till limit 2 DFS will be implemented from our start node A and its children B, C, D, and E and then
from E it moves to F similarly backtracks the path and explores the unexplored branch where node
G is present and then retraces the path and explores the child of C i.e. node H and then we finally
reach our goal by applying DLS Algorithm.
xi. Suppose we have further successors of node F but only the nodes till the limit 2 will be explored as
we have limited the depth and have reached the goal state.

Advantages:

o Depth-limited search is Memory efficient.

Disadvantages:

o Depth-limited search also has a disadvantage of incompleteness.


o It may not be optimal if the problem has more than one solution.

(B) Greedy Best First Search (Informed search)

i. Greedy best-first search expands the node that appears to be closest to goal i.e. the idea is to
expand the node with the smallest estimated cost to reach the goal.
ii. It tends to find good solutions quickly, but path may not be the shortest path i.e. optimal.
iii. We use a heuristic function f(n) = h(n) where h(n) estimates the distance remaining to a goal.
iv. Considering an example of a route finding problem: S is the starting state, G is the goal state. A
good heuristic for the route-finding problem would be straight-line distance to the goal.

v. The straight line distance heuristic estimates for nodes are as follows-
vi. Figure to show the steps of greedy best first search is as follows-

vii. The algorithm is not optimal. The algorithm is also incomplete, and it may fail to find a solution
even if one exists. This can be seen by running greedy search on the following example – using
straight-line distance heuristic for the route- finding problem.
viii. Example-

You might also like