One of the comments on my post about The Esssence of Heuristics went like this:
“An excellent example of a heuristic is a hammer.”
Ecstasy is your friend: it picks you up at the airport.
Non heuristics that can help an expert solve a problem, without being a guarantee – an abridged list:
* Money
* Time
* Expertise
* Newton-Raphson Algorithm
* Analogies
It was posted anonymously. I generally don’t publish anonymous comments that are argumentative, because opponents who yell things and run away bore me… but this one is helpful. The writer is a little confused, but I bet other people are confused too, in the same way.
He offers a list of things that he claims are non-heuristics (he doesn’t explain why so I guess he thinks they are “obviously” non-heuristics), and suggests that they meet my definition. I think he’s trying to make two points: either my definition of heuristics is wrong because it admits non-heuristics, or it’s trivial because then everything would be a heuristic and therefore the idea conveys no information.
Well, the first point is easily handled. By definition, each thing on his list is heuristic (because he has declared that they help without guaranteeing in some scenario which he seems to have in mind). There is no contradiction, he’s simply mistaken by calling those things non-heuristics.
As to his second point, that’s where the real confusion lies. I think he is mixed-up because he expects heuristics to have some essential nature that identifies them. But what makes something a heuristic is not its essential nature, but rather its relationship to the problem and the problem-solver. We say that anything that may help you solve a problem has “heuristic value” for you with respect to that problem. But if it is infallible (and also if it halts) then we don’t call it a heuristic. We call it an algorithm. For instance, long division is a guaranteed way for dividing one rational number with a finite number of digits by another such number. However, long division is just a heuristic if we were to apply it to splitting the check at a restaurant. It doesn’t guarantee that everyone will feel that they are paying a fair share.
How about instead of heuristics we think about weapons? Would it be absurd of me to suggest that a weapon is any fallible method of attacking your enemy or winning a battle? Someone might reply “But James, are pickles really weapons? Sand? Wind?” The answer is: they can be, depending on your situation. But you don’t need to catalog all possible weapons. Instead you study the art of combat and learn to spot the things that will help you. Myamoto Musashi wrote exactly about this in 1645:
We cannot speak intelligibly about heuristics without identifying the problem, the problem-solver, and the dynamics of the situation. You can make a list of anything you want, Mr. Anonymous, but can you answer my next questions, which are: what specific problems are you talking about for which these are heuristics and how specifically are they heuristic? Or if you think they aren’t heuristics, what specific problem do you think they can’t help with and why not?
Michel Kraaij says
Hello James,
I’m still trying to get grip on understanding heuristics. The best thing for me to do is create examples to represent the problem (which on it’s own is also a heuristic?):
Could you say that replacing “blabla greater or equal than yadayada” by “A >= B” is (at least for me) an “easier-reading-heuristic”? It helps me understand complex decisions, but could be fallible for others, because not everybody understands mathematical notations. And there could be situations that it doesn’t always turn out they way i wanted it to be (meaning, easier readible).
[James’ Reply: You could do that, but I don’t know why you would. The fallibility of it is not very pronounced. It’s also not something that you choose to apply or not to apply. It generally just a convention.
But technically, it’s a heuristic if it helps solve a problem but doesn’t guarantee the solution.]
Michel Kraaij says
I understand what you are saying, but somehow i can’t seem to get real grip on heuristics (that is, in a way that i could explain heuristics clearly to someone else).
Indeed i was also conflicted about stating the above example, because it indeed tends towards conventions, or even an algoritm (i have created a script which automates this translation for me). But like another heuristic states, sometimes it is good to state what you do not want to understand (in this case an algoritm or convention) to get grip in what you do want to understand.
[James’ Reply: I’m not sure what you’re struggling with. Perhaps because it’s such a simple concept, it’s throwing you off.
Something (anything) has heuristic value if it helps you solve a problem: “heuristic value” = “problem-solving value”
If it’s guaranteed, we would call it an algorithm, or just a method or a process, or perhaps just a “solution.” It does not need to be steered or supervised. It’s just going to work.
But if it need someone to decide when and how to apply it in order for it to do what it does; if it could be misused in the context of solving that problem; then we signal that by calling it a heuristic. It’s a way of saying “useful but be careful with it.”
Consider reading Discussion of the Method, by Billy Koen. He explains heuristics in fabulous detail.]
Aaron G says
There was one interesting item on the anonymous list that you didn’t really address, which was the Newton-Raphson algorithm. I’m not trying to be argumentative here, but since you mentioned that an “infallible heuristic” is essentially an algorithm, it raises the question, can an algorithm ever be heuristic? (And if so, how does one disambiguate?)
[James’ Reply: It’s simple to disambiguate. An algorithm is guaranteed to do what it does, by the laws of logic. If that thing which it does is exactly the same as the solution to a problem you have in mind, then it’s not a heuristic.
Mr. Anonymous stipulated that his list was not guaranteed to solve problems, so I assumed he was applying the algorithm he referenced to a problem that it was not logically guaranteed to solve.
Similarly, a hammer is guaranteed to crash into something if you swing it. If crashing into anything at all will for sure solve the problem you have in mind, then you wouldn’t call it a heuristic. But usually a hammer is used to build things, and must be guided with skill. Hence, obviously, it IS a heuristic in that respect.]
If we take the subset sum problem as another example – one “algorithm” for solving it is to simply pick random subsets until one is found that solves the problem or some predetermined retry limit is exhausted. For small enough sets (a few hundred elements), this is almost guaranteed to solve the problem in a fraction of a second. But there’s still a small possibility that it will fail, even when the problem is solvable. Without the retry limit, it may not halt. So is this an heuristic method, is it an algorithm, or is it both?
[James’ Reply: It sounds like both. An algorithm may be used as a heuristic. Realize that the problem you are solving may have several dimensions. Cost and time, for instance. An algorithm guaranteed to find a solution if left to run for an arbitrary length of time that may be much longer than the time you have is a heuristic because the full solution includes solving it quick enough. Therefore, we must apply that algorithm with care and know when to turn it off. Remember that our goal is not just to name things “heuristics” for the sake of it, but to take the next step and ask what skill, knowledge, judgment, attention, is needed to properly apply and control and suspend our heuristics.]
I’m sold on your definition of “heuristic” – I’m just wondering if there’s a better label than “algorithm” for the opposite end of the spectrum.
[James’ Reply: There may be, but like Billy Koen (who wrote Discussion of the Method all about heuristics), I don’t find it interesting to worry about the other end of the spectrum. The only methods I have access to for solving interesting problems in my domain are heuristic. The algorithms and physical laws I work with don’t solve interesting problems. That is to say, once they solve such problems, they are no longer interesting.]
Shrini says
>> If that thing which it does is exactly the same as the solution to a problem you have in mind, then it’s not a heuristic.
This brings out an interesting outcome (at least to me)… a method can be heuristic at times and can be a non-heuristic (infallible). Much like a value that a mathematical function (y= f(x, z, m) ) can assume depending upon the values that independent variables can assume.
Where do we fit skill here – an independent variable?
By that definition, deciding when a method becomes heuristic when other wise can only be determined posteriori. Right? An algorithm on the contrary, I think proclaims the infallibility a priori.
[James’ Reply: Posterior to what? I’m not sure what you’re trying to say. I certainly don’t need to look back and find heuristics only in retrospect, if that’s what you mean.]
>>> Hence, obviously, it IS a heuristic in that respect
Another point about variable nature of method. A method can be heuristic from one view point and can be non-heuristic from another.
Out of the list of the items I am certain that “money, expertise, time, analogies” are heuristically fallible. Can money guaranty solution in all respects? or when money fails to solve a problem – say a problem of trust (or lack of it).
As side track, I believe “process”, “best practice” anything that proclaim infallibility of method applied to solve problem are “anti patterns” to heuristic.
Shrini
Blaine Martin says
Shrini,
I think that your point is exactly right and what James was attempting to say. Whether an item/test/etc is heuristic, much like testing in general and many things in life, is based on the context in which you are using the object.
To take the example of money:
If your end goal is to have a new piece of software tested in one week, then money is heuristic, as it will help you hire on new tests or pay your current tests over time. However, this still does not guarantee that the software will be fully tested in time. If the testers aren’t competent and take more time to complete a test or if your project manager cannot efficiently organize the team, all the money in the world will not allow all the necessary tests to be run in time.
However, if your end goal is to pay your rent, at least in a situation where bartering is not an option, money is non-heuristic, as it is the necessary tool to accomplish the task of paying your rent.
No singular item is going to be heuristic or non-heuristic at all times. It is all dependent upon the context in which you are viewing the particular item. The most important tool is to be able to decipher when an item is or is not heuristic, as it allows you to know how much emphasis to put on that particular thing when using it.