Recent Articles



































Heuristic (computer science)



         


For alternate uses, see heuristic

In computer science, a heuristic is a technique designed to solve a problem that ignores whether the solution is provably correct, but which usually produces a good solution or solves a simpler problem that contains or intersects with the solution of the more complex problem.

A heuristic is not guaranteed always to solve the problem, but often solves it well enough for most uses, and often does so more quickly than a more complete solution would.

A methodic is another way of solving a problem.

More formally, a heuristic is a function, <math>h(n)<math> defined on the nodes of a search tree, which serves as an estimate of the cost of the cheapest path from that node to the goal node. Heuristics are used by informed search algorithms such as Greedy best-first search and A* to choose the best node to explore. Greedy best-first search will choose the node that has the lowest value for the heuristic function. A* will expand nodes that have the lowest value for <math> g(n)+h(n) <math>, where <math>g(n)<math> is the (exact) cost of the path from the initial state to the current node. When <math>h(n)<math> is admissible - that is if <math>h(n)<math> never overestimates the costs of reaching the goal - A* is provably optimal.

The classical problem involving heuristics is the n-puzzle. Commonly used heuristics for this problem include counting the number of misplaced tiles and finding the sum of the Manhattan distances between each block and its position in the goal configuration. Note that both are admissible.

[Top]

Effect of heuristics on computational performance

In any searching problem where there are <math>b<math> choices at each node and a depth of d at the goal node, a naive searching algorithm would have to potentially search around <math>b^d<math> nodes before finding a solution. Heuristics improve the efficiency of search algorithms by reducing the branching factor from <math>b<math> to (ideally) a low constant b*.

Although any admissible heuristic will give an optimal answer, a heuristic that gives a lower branching factor is more computationally efficient for a particular problem. It can be shown that a heuristic <math>h_2(n)<math> is better than another heuristic <math>h_1(n)<math> , if <math>h_2(n)<math> dominates <math>h_1(n)<math>, ie. <math>h_1(n) < h_2(n)<math> for all <math>n<math>.

[Top]

Finding heuristics

The problem of finding an admissible heuristic with a low branching factor for common search tasks has been extensively researched in the AI community. A number of common techniques are used:

Using these techniques a program called ABSOLVER was written (1993) by A.E. Prieditis for automatically generating heuristics for a given problem. ABSOLVER generated a new heuristic for the 8-puzzle better than any pre-existing heuristic and found the first useful heuristic for solving the Rubik's Cube.





  View Live Article   This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License