Lecture 5. Informed Search
Lecture 5. Informed Search
1
Topics to be covered
• Informed Search.
• Heuristic Function.
2
Amity School of Engineering and Technology
Informed Search
• Informed search tries to reduce the amount of search that must be done by making intelligent choices
for the nodes that are selected for expansion.
3
Amity School of Engineering and Technology
Heuristic Function
• A heuristic function is a function that ranks alternatives in various search algorithms at each
branching step based on the available information (heuristically) in order to make a decision
about which branch to follow during a search.
• Well designed heuristic functions can play an important part inefficiently guiding a search
process toward a solution.
• Sometimes very simple heuristic functions can provide a fairly good estimate of whether a path
is any good or not.
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Practice Question on A*
Find the path to reach from S to G using A* search.
19
20
21
22
23
Practice Question on AO*
Figure represents an AO graph with the values labeled as follows. The value in a single line circle is
an estimate of cost. The value in a double lined circle, a SOLVED node, is the actual value. Each edge
is labeled with a different cost. What is the value of the root node for the optimal solution for the AO
graph?
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Practice Question on Graph Coloring
Color following graph for three color red, green, blue with constraints that no adjacent node have same
color.
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Means-Ends Analysis
Search is the process of discovery and assembly of sequences of actions that will
lead from a given state to a desired state.
How MEA works?
The means-ends analysis process can be applied recursively for a problem.
It is a strategy to control search in problem-solving. Following are the main
Steps which describes the working of MEA technique for solving a problem.
1.First, evaluate the difference between Initial State and final State.
2.Select the various operators which can be applied for each difference.
.
Algorithm for Means-Ends Analysis:
Let's we take Current state as CURRENT and Goal State as GOAL, then following are the
steps for the MEA algorithm.
Step 1: Compare CURRENT to GOAL, if there are no differences between both then return Success
and Exit.
Step 2: Else, select the most significant difference and reduce it by doing the following steps until the
success or failure occurs.
Select a new operator O which is applicable for the current difference, and if there is no such
operator, then signal failure.
Attempt to apply operator O to CURRENT. Make a description of two states.
i) O-Start, a state in which O?s preconditions are satisfied.
ii) O-Result, the state that would result if O were applied In O-start.
If
(First-Part <------ MEA (CURRENT, O-START)
And
(LAST-Part <----- MEA (O-Result, GOAL), are successful, then signal Success and return the
result of combining FIRST-PART, O, and LAST-PART
Example of Mean-Ends Analysis:
In this problem, we need to get the goal state by finding differences between
the initial state and goal state and applying operators.
Amity School of Engineering and Technology
Thank You
69