In computer science, besides the common use as "rule of thumb" (see heuristic), the term heuristic has two well-defined technical meanings.
Often, one can find specially crafted problem instances where the heuristic will in fact produce very bad results or run very slowly; however, these instances might never occur in practice because of their special structure. Therefore, the use of heuristics is very common in real world implementations. For many practical problems, a heuristic algorithm may be the only way to get good solutions in a reasonable amount of time.
There is a class of general heuristic strategies called metaheuristics, which often use randomized search for example. They can be applied to a wide range of problems, but good performance is never guaranteed.
For shortest path problems, the term has a different meaning. Here, a heuristic is a function, 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* search will expand nodes that have the lowest value for , where is the (exact) cost of the path from the initial state to the current node. If is admissible—that is, if never overestimates the costs of reaching the goal—, then A* will always find an optimal solution.
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.
In any searching problem where there are choices at each node and a depth of at the goal node, a naive searching algorithm would have to potentially search around nodes before finding a solution. Heuristics improve the efficiency of search algorithms by reducing the branching factor from to a lower constant , using a cutoff mechanism. The branching factor can be used for defining a partial order on the heuristics, such that if has a lower branch factor than for a given node of the search tree. Heuristics giving lower branching factors at every node in the search tree are preferred for the resolution of a particular problem, as they are more computationally efficient.
The problem of finding an admissible heuristic with a low branching factor for common search tasks has been extensively researched in the artificial intelligence community. Several 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.
Heuristika | Heuristik#Informatik | Heurística (computación) | Heurística | ฮิวริสติก (วิทยาการคอมพิวเตอร์) | Эвристическое сканирование
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Heuristic (computer science)".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world