Admissible heuristic
Encyclopedia
In computer science
, specifically in algorithms
related to Pathfinding
, a heuristic function
is said to be admissible if it is no more than the lowest-cost path to the goal. In other words, a heuristic is admissible if it never overestimates the cost of reaching the goal. An admissible heuristic is also known as an optimistic heuristic.
For example, in A* search the evaluation function (where is the current node) is:
= +
where = the evaluation function. = the cost from the start node to the current node = estimated cost from current node to goal.
is calculated using the heuristic function. With a non-admissible heuristic, the A* algorithm could overlook the optimal solution to a search problem due to an overestimation in .
version of the problem, or by information from pattern databases that store exact solutions to subproblems of the problem, or by using inductive learning
methods.
The Hamming distance
is the total number of misplaced tiles. It is clear that this heuristic is admissible since the total number of moves to order the tiles correctly is at least the number of misplaced tiles (each tile not in place must be moved at least once). The cost (number of moves) to the goal (an ordered puzzle) is at least the Hamming distance
of the puzzle.
The Manhattan distance of a puzzle is defined as:
The Manhattan distance is an admissible heuristic because every tile will have to be moved at least the amount of spots in between itself and its correct position. Consider the puzzle below:
The subscripts show the Manhattan distance for each tile. The total Manhattan distance for the shown puzzle is:
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...
, specifically in algorithms
Algorithm
In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning...
related to Pathfinding
Pathfinding
Pathfinding generally refers to the plotting, by a computer application, of the shortest route between two points. It is a more practical variant on solving mazes...
, a heuristic function
Heuristic function
A heuristic function, or simply a heuristic, is a function that ranks alternatives in various search algorithms at each branching step based on the available information in order to make a decision about which branch to follow during a search.-Shortest paths:For example, for shortest path...
is said to be admissible if it is no more than the lowest-cost path to the goal. In other words, a heuristic is admissible if it never overestimates the cost of reaching the goal. An admissible heuristic is also known as an optimistic heuristic.
Search Algorithm
An admissible heuristic is used to estimate the cost of reaching the goal state in an informed search algorithm. In order for a heuristic to be admissible to the search problem, the estimated cost must always be lower than or equal to the actual cost of reaching the goal state. The search algorithm uses the admissible heuristic to find an estimated optimal path to the goal state from the current node.For example, in A* search the evaluation function (where is the current node) is:
= +
where = the evaluation function. = the cost from the start node to the current node = estimated cost from current node to goal.
is calculated using the heuristic function. With a non-admissible heuristic, the A* algorithm could overlook the optimal solution to a search problem due to an overestimation in .
Formulation
- is a node
- is a heuristic
- is cost indicated by to reach a goal from
- is the actual cost to reach a goal from n
- is admissible if
Construction
An admissible heuristic can be derived from a relaxedversion of the problem, or by information from pattern databases that store exact solutions to subproblems of the problem, or by using inductive learning
Inductive transfer
Inductive transfer, or transfer learning, is a research problem in machine learning that focuses on storing knowledge gained while solving one problem and applying it to a different but related problem...
methods.
Examples
Two different examples of admissible heuristics apply to the fifteen puzzle problem:- Hamming distanceHamming distanceIn information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different...
- Manhattan distance
The Hamming distance
Hamming distance
In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different...
is the total number of misplaced tiles. It is clear that this heuristic is admissible since the total number of moves to order the tiles correctly is at least the number of misplaced tiles (each tile not in place must be moved at least once). The cost (number of moves) to the goal (an ordered puzzle) is at least the Hamming distance
Hamming distance
In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different...
of the puzzle.
The Manhattan distance of a puzzle is defined as:
The Manhattan distance is an admissible heuristic because every tile will have to be moved at least the amount of spots in between itself and its correct position. Consider the puzzle below:
43 | 61 | 30 | 81 |
72 | 123 | 93 | 144 |
153 | 132 | 14 | 54 |
24 | 101 | 111 |
The subscripts show the Manhattan distance for each tile. The total Manhattan distance for the shown puzzle is: