Heuristic Function

Md Khaled Hasan
2 min readDec 17, 2020

--

Let us think what heuristic is in general. Heuristics are quick solutions to any problem. For example: Zuckerberg wears same dress everyday. If he had to wear different dress everyday, he had to choose his dresses everyday. In spite of this, he had chosen a default dress based on his past experiences. So this is the quickest solution of his everyday problem of what to wear.

Mark Zuckerberg(CEO of Facebook) in his default dress.

Now let’s dive into the more theoretical approach. A heuristic function is a function that calculates the approximate cost to a problem. The purpose of a heuristic function is to guide towards the solution of a problem in the most profitable way possible. The solution may not be the best but works on approximately the best.

Let’s try an example.

Let’s say, we have to go from A to C. There are several ways to go there. Heuristic function will delineate the straight distance from A to C. In our case its the line in the blue color. We will not use the line to go from A to C. Hence, we will use it to find the appropriate path from A to C for us.

--

--

Md Khaled Hasan

I love learning new things. I get an adrenaline rush when I can explain any theoretical physics and maths to anyone. Hope to explain to the more people I can.