I S Unit 2
I S Unit 2
HEURISTIC SEARCH
heuristic is a technique that is used to solve a problem faster than the classic methods.
These techniques are used to find the approximate solution of a problem when classical
methods do not. Heuristics are said to be the problem-solving techniques that result in
practical and quick solutions.
Heuristics are strategies that are derived from past experience with similar problems.
Heuristics use practical methods and shortcuts used to produce the solutions that may or
may not be optimal, but those solutions are sufficient in a given limited timeframe.
Heuristics are used in situations in which there is the requirement of a short-term solution. On
facing complex situations with limited resources and time, Heuristics can help the companies to
make quick decisions by shortcuts and approximated calculations. Most of the heuristic
methods involve mental shortcuts to make decisions on past experiences.
heuristic method might not always provide us the finest solution, but it is assured that it
helps us find a good solution in a reasonable time.
Based on context, there can be different heuristic methods that correlate with the
problem's scope. The most common heuristic methods are - trial and error, guesswork,
the process of elimination, historical data analysis. These methods involve simply available
information that is not particular to the problem but is most appropriate. They can include
representative, affect, and availability heuristics.
s algorithm always chooses the path which appears best at that moment. It is the
combination of depth-first search and breadth-first search algorithms. It lets us to take
the benefit of both algorithms. It uses the heuristic function and search. With the help of
the best-first search, at each step, we can choose the most promising node.
Best first search algorithm:
Step 3: Remove the node n from the OPEN list, which has the lowest value of h(n), and
places it in the CLOSED list.
Step 5: Check each successor of node n, and find whether any node is a goal node or not.
If any successor node is the goal node, then return success and stop the search, else
continue to next step.
Step 6: For each successor node, the algorithm checks for evaluation function f(n) and
then check if the node has been in either OPEN or CLOSED list. If the node has not been
in both lists, then add it to the OPEN list.
It is also called greedy local search as it only looks to its good immediate neighbor state
and not beyond that. The steps of a simple hill-climbing algorithm are listed below:
Step 1: Evaluate the initial state. If it is the goal state, then return success and Stop.
Step 2: Loop Until a solution is found or there is no new operator left to apply.
Else if it is better than the current state, then assign a new state as a current state.
Else if not better than the current state, then return to step2.
Step 5: Exit.
• Global maximum: It is the best possible state in the state space diagram.
This is because, at this stage, the objective function has the highest value.
• Plateau/flat local maximum: It is a flat region of state space where
neighboring states have the same value.
• Ridge: It is a region that is higher than its neighbors but itself has a slope.
It is a special kind of local maximum.
• Current state: The region of the state space diagram where we are
currently present during the search.