Unit 1 l3
Unit 1 l3
HEURISTIC SEARCH
TECHNIQUES
HEURISTIC SEARCH TECHNIQUES
The artificial intelligence provides the appropriate search technique to solve the
problem,
Because the problem that falls within the artificial intelligence are too complex
to be solved by
the direct technique. Hence AI provides the varieties of heuristic search for
solving these problems.
1.Generate –and –Test
2.Hill Climbing
3.Best- first search
4. Problem reduction
5.Constraint Satisfaction
6.Mean –End analysis
GENERATE –AND –TEST METHOD
The generate and test method consist of following steps:
1. Generate a possible solution for some problem. Hence it generates a particular
point in the problem space and for some other problem it generates a path from
start state.
2. Test to see if this is actually a solution by comparing the chosen point or the
endpoint of chosen path to set the acceptable goal states.
3. If the solution has been found then quit otherwise go to step (1).
If the generation of possible solution performed systematically then this
procedure will find a solution eventually. Unfortunately if the problem space is
very large then generate-and-test takes very long time for finding the solution.
The generate -and-test algorithm is a depth first search procedure since the
complete solution must be generated before they can be tested.
HILL CLIMBING
The Hill Climbing is a variant of generate-and test procedure. In this method
we take the feedback from the possible solution which is used to help the
generator to decide which direction to move in the search space. In the pure
generate-and-test method the function respond only yes or no but if the test
function is augmented with heuristic function that provide an estimate of how
close a given state is to a goal state.
Hill Climbing is often used when a good heuristic function is available for
evaluating state but when no other useful knowledge is available.
Example: Suppose you are in unfamiliar city without a map and you want to
get down town .You simply aim for some location. The heuristic function is
just distance between the current location and the location of the goal. The
desire states are those in which the distance is minimum
Algorithms
This type of algorithm finds a path from the starting node of the
graph to a set of nodes representing the solution. Also it may be
necessary to get to more than one solution state since each arm of
AND arc must lead to its own solution node. The number at each
node represent the value of f’ at that node. Hence for every
operation has a uniform cost so each arc with a single successor
has a cost of 1 and each AND arc with multiple successor has a
cost of 1 for each of its components. For example consider:
1. AND- OR GRAPH(cont..)
(8) A
An Example
[12] A [13]
4 5
5
(1) B D (8)
(2)
C
An Example
[15] A [13]
4 5
5
(4) B 2 D (8)
(2)
C
An Example
[15] A [8]
4 5
5
(4) B 2 D (3)
(2)
C 2
4
(1) E
(0) G
An Example
[15] A [9]
4 5
5
(4) B 2 D (4)
(2)
C 2
2
4
(3) E
3
(0) G
An Example
[15] A Solved
4 5
5
(4) B 2 D Solved
(2)
C 2
2
4
(3) E
3
(0) G Solved
Constraint Satisfaction
In artificial intelligence and operations research, constraint
satisfaction is the process of finding a solution to a set
of constraints that impose conditions that the variables must
satisfy.
Constraint satisfaction problems (CSPs) are mathematical problems
defined as a set of objects whose state must satisfy a number
of constraints or limitations. CSPs represent the entities in a problem as a
homogeneous collection of finite constraints over variables, which is
solved by constraint satisfaction methods. CSPs are the subject of intense
research in both artificial intelligence and operations research, since the
regularity in their formulation provides a common basis to analyze and
solve problems.
CSP Example: Cryptharithmetic puzzle
Problem:
Problem Statement
How to assign decimal digits to
letters, so that the following sum
is valid? Assume that we already SEND
know that + MORE
The possible digits set for the
letters is {0,1,2,…9};
--------
M must be 1; MONEY
Two different letters can't be
S E N D D+E = Y+10*C1
M O R E C1+N+R = E+10*C2
+ C3 C2 C1 C2+E+O = N+10*C3
---------------------- C3+S+M = O+10*M
M O N E Y
Exercise