Skip to content
Glossary

Heuristic

A problem-solving approach using shortcuts for speed over accuracy, often in search and optimization tasks.
Definition

In the context of artificial intelligence and machine learning, a heuristic is a strategy or method that guides the search for solutions in a more efficient way than exhaustive search methods, by making educated guesses or applying practical rules of thumb. Heuristics do not guarantee optimal solutions; instead, they aim for satisfactory solutions within a reasonable time frame or with limited computational resources.

They are particularly useful in complex problems where finding an exact solution is impractical due to the vast search space or computational constraints. Heuristics are based on experience, intuition, or domain-specific insights, and they can significantly reduce the time and computational cost required to solve problems.

Examples/Use Cases:

Heuristics play a crucial role in algorithms for solving NP-hard problems, such as the traveling salesman problem (TSP), where the goal is to find the shortest possible route that visits each city exactly once and returns to the origin city. An example of a heuristic in this context is the nearest neighbor algorithm, which starts at a random city and, at each step, travels to the closest city not yet visited. This heuristic does not guarantee the shortest possible tour but often produces a good approximation in a fraction of the time required by an exhaustive search.

In AI, heuristics are also central to game-playing algorithms, such as those used in chess or Go. The minimax algorithm, used with a heuristic evaluation function that assesses the desirability of a game board position, can determine the best move by considering possible sequences of moves and countermoves without exploring every possible game state. This heuristic evaluation helps in pruning the search tree and focusing on the most promising paths, enabling the algorithm to make strong moves in games with vast possible states.

Related Terms
← Back to Glossary

Need human evaluators for your AI research? Scale annotation with expert AI Trainers.