I love deadlines. I like the whooshing sound they make as they fly by.” – Douglas Adam

Thursday, 10 July 2014

Understanding Heuristics


I have been listening to the word 'heuristic' and the role of heuristics in solving the problems,  in many conversations with my testing friends, and in many blogs that I read. I have been giving lot of thought about it and exercising it in my work.

I have also noticed that many of my friends had difficulty in understanding what heuristics are exactly and how are they helpful in solving problems.

So here I come up with a small article that might help to understand heuristics and know if they help in solving problems.

Let us first look at the google meaning of this word Heuristic

From the above definition we get that, Heuristic process - enables us to discover or learn something - by ourselves. So, by making use of heuristics we will be able to discover a problem or learn about a problem ourselves.

Let us look at another definition and understand this better

So heuristic is a - rule of thumb - educated guess (a guess with some sense behind it) - that helps us in searching a solution to a problem - which is difficult or poorly understood

Now lets look at this wiki definition

Heuristic (/hjʉˈrɪstɨk/Greek: "Εὑρίσκω", "find" or "discover") refers to experience-based techniques for problem solving, learning, and discovery that give a solution which is not guaranteed to be optimal

So heuristic is a - experience based technique - to solve a problem - to learn a problem - to discover a problem - to give a solution - which is not guaranteed to be optimal

Combining all these, let us say

Heuristic is a - technique, approach, guess - to solve, learn, discover - a difficult or poorly understood problem - which might not be guaranteed to be optimal

Putting it in the simple language, we can understand heuristic as - any thought, idea or approach that helps us to find out or figure out something.

Let us take some daily life examples and understand heuristics better.

'Trial and error' - Heuristic

We all must be familiar with the 'Trial and error' method.  While applying this method to solve a problem, we assume a possible solution and check if it is feasible. If it fails, we come up with another trial and check again. We keep making trials every time we fail, and we may or may not find a solution.

So here 'trial and error' is an heuristic method, though every attempt of it din't promise us a solution, it has helped us in figuring out some or other method to try for a solution.

Turn on the tap - exercise

Let us take an exercise where you are asked to turn on the tap to wash your hands. Also let us say this tap is of new design which you haven't seen so far. By looking at it you could analyze that it has a valve that is stopping the water flow and all you need to do is move the valve in some direction so that water flows out.

Now the possible actions you might do is - turn it to right (may be most common practice), turn it to left (immediate alternate guess), lift it up, push it down etc., While you are doing these, the tap might turn on at a particular action or it might not.

So you have been trying to open it with some possible guess you could make out of whatever logic or whatever knowledge you had on it. Every trial of yours was again a heuristic to open the tap, which failed sometimes and which might have passed another time.

So, heuristics help us to solve a problem. How?

Looking at these definitions and examples, we can say that heuristics help us to solve a problem. Let us analyze how are they helping us to solve a problem.

By looking at the behavior of the system each time a heuristic is applied - we get a chance to study the system, we get a chance to gather more information about the system and get to think about more possible ways of solving the problem. So every time a new heuristic is applied, we get to dive more deeper to solve the problem.

So as we progress, every heuristic might help us in building new heuristics, and might help us in solving or studying the problem much better.

So, heuristics are fallible. How?

After reading all this, we understand that heuristic is not a formula that would guarantee us a solution. Heuristic is an approach that we build to try solving a problem. Heuristic is an idea that we have, that we think, that we assume that, that could solve a problem.

As - assumptions, ideas, approaches - have a probability of failing, so are the heuristics. They might fail at times and they might pass at times.

So heuristics are fallible.

So, my article is an heuristic. How?

I have tried my approach to explain you about heuristics and make you understand. I am not sure if this has helped you or not, but surely it might have helped you to solve your problem of understanding heuristics.

I am sure if you can find out more heuristic ways to learn heuristics yourselves, you will surely understand what heuristics are.

I would be happy if my heuristic article passed to help you, else please come up with some heuristics to help me understand heuristics better.

Thanks for reading :)

1 comment: