HEURISTIC ALGORITHM
Heuristic Search methods Generate and Test Algorithm
Hill climbing
Here the generate and test method is augmented by an heuristic function which measures the closeness of the current state to the goal state.
The term heuristic is used for algorithms which find solutions among all possible ones ,but they do not guarantee that the best will be found,therefore they may be considered as approximately and not accurate algorithms.These algorithms,usually find a solution close to the best one and they find it fast and easily.Sometimes these algorithms can be accurate,that is they actually find the best solution, but the algorithm is still called heuristic until this best solution is proven to be the best.The method used from a heuristic algorithm is one of the known methods,such as greediness,but in order to be easy and fast the algorithm ignores or even suppresses some of the problem's demands.
Heuristic Search
A heuristic is a method that- might not always find the best solution
- but it is guaranteed to find a good solution in reasonable time.
- By sacrificing completeness it increases efficiency.
- Useful in solving tough problems which
- could not be solved any other way.
- solutions take an infinite time or very long time to compute.
Heuristic Search methods Generate and Test Algorithm
- generate a possible solution which can either be a point in the problem space or a path from the initial state.
- test to see if this possible solution is a real solution by comparing the state reached with the set of goal states.
- if it is a real solution, return. Otherwise repeat from 1.
Hill climbing
Here the generate and test method is augmented by an heuristic function which measures the closeness of the current state to the goal state.
- Evaluate the initial state if it is goal state quit otherwise current state is initial state.
- Select a new operator for this state and generate a new state.
- Evaluate the new state
- if it is closer to goal state than current state make it current state
- if it is no better ignore
- If the current state is goal state or no new operators available, quit. Otherwise repeat from 2.
No comments:
Post a Comment