Heuristic

Generally speaking, a heuristic is a "rule of thumb," or a good guide to follow when making decisions. In computer science, a heuristic has a similar meaning, but refers specifically to algorithms.

When programming software, computer programmers aim to create the most efficient algorithms to accomplish various tasks. These may include simple processes like sorting numbers or complex functions such as processing images or video clips. Since these functions often accept a wide range of input, one algorithm may perform well in certain cases, while not very well in others.

For example, the GIF image compression algorithm performs well on small images with few colors, but not as well as JPEG compression on large images with many colors. If you knew you were only going to be dealing with small images that didn't have a wide range of colors, GIF compression would be all you need. You wouldn't have to worry about large, colorful images, so there would be no point in optimizing the algorithm for those images. Similarly, computer programmers often use algorithms that work well for most situations, even though they may perform inefficiently for uncommon situations.

Therefore, a heuristic process may include running tests and getting results by trial and error. As more sample data is tested, it becomes easier to create an efficient algorithm to process similar types of data. As stated previously, these algorithms are not always perfect, but work well most of the time. The goal of heuristics is to develop a simple process that generates accurate results in an acceptable amount of time.

Updated in 2006 by Per C.

quizTest Your Knowledge

macOS Sierra followed which version of Apple's operating system?

A
El Capitan
0%
B
Yosemite
0%
C
Mavericks
0%
D
Mountain Lion
0%
Correct! Incorrect!     View the Sierra definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Heuristic on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.