A machine with poor heuristic programming? Image copyright Warner Bros. Television
I was writing a paper for a client this week only to realise that an important piece of jargon-busting was missing. As I set about trying to simplify these terms, I realised this might be a helpful glossary to a more general audience:
We hear a lot of talk of algorithms these days (slightly less on heuristics, but that will change). In fact, algorithms are such an important component of our everyday lives it’s amazing that they aren’t better understood.
Put simply, an algorithm is a mathematical model for completing a task. A heuristic is a mathematical guide to solving a problem. An algorithm is specific and will always work, regardless of the situation. A heuristic is imprecise, and might not guide you to the right answer, but is the best approximation to hand. My personal favourite definition of the difference between the two is: “A heuristic is an algorithm in a clown suit. It’s less predictable, it’s more fun, and it comes without a 30-day, money-back guarantee.” (Faisal Sikder, 2010)
Another way a lay-reader can think about the distinction is to imagine that machines are inherently ‘algorithmic’ and people are inherently ‘heuristic’. At time of writing, computers are essentially mechanical devices with fixed hardware and prescribed software which operates by providing a set of instructions for the hardware to follow in a particular sequence in order to perform a particular task. Mathematical equations are the simplest type of algorithms computers are set to run – video games, or financial risk models perhaps the most complicated. Computers are very well suited to these tasks.
Humans on the other hand are not well suited to following an algorithmic approach and nor do we appreciate seeing other people trying to constrain us in this way either. Imagine a telephone helpline – the operator on the other end is simply best trying to match your responses to a set of pre-described formulaic questions which have been designed to most ‘efficiently’ route your call. Infuriating isn’t it? Surely, much better to give the operator a set of guidelines to follow and let them follow their initiative?
This is where heuristics come in. In the case where an algorithm hasn’t been created to solve a particular problem (or where it is impossible to do so) a heuristic can provide an approach to ‘narrow-down’ the set of options to find the solution or approximate solution rather than simply trying every combination of options. The best example of this in our human-computer relationships is predictive text technology on your phone or on websites such as Google. The system doesn’t ‘know’ what you are about to type, nor is it able to calculate how likely its prediction will be true, but it is a form of digital ‘best-guess’ to the problem.
My best-guess? We’re going to ‘see’ a lot more of heuristics in the years to come.