Lably
Skip to content

Heuristic (computer science)

Type of algorithm, produces approximately correct solutions

  • 6 min read
  • 4 chapters

Related on Lably

Through Mathematical optimization, Computer science and Problem solving

A heuristic function, also simply called a heuristic, is a function that ranks alternatives in search algorithms at each branching step based on available information to decide which branch to follow. For example, it may approximate the exact solution.

Definition and motivation

The objective of a heuristic is to produce a solution in a reasonable time frame that is good enough for solving the problem at hand. This solution may not be the best of all the solutions to this problem, or it may simply approximate the exact solution. But it is still valuable because finding it does not require a prohibitively long time.

Heuristics may produce results by themselves, or they may be used in conjunction with optimization algorithms to improve their efficiency (e.g., they may be used to generate good seed values).

Results about NP-hardness in theoretical computer science make heuristics the only viable option for a variety of complex optimization problems that need to be routinely solved in real-world applications.

Heuristics underlie the whole field of artificial intelligence and the computer simulation of thinking, as they may be used in situations where there are no known algorithms.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication