What is a heuristic function?

Informed Search uses the heuristic function to discover the most plausible path. It takes the agent’s current state as input and outputs an estimate of how near the agent is to the objective. The heuristic technique, on the other hand, may not always provide the optimal answer, but it guarantees that a decent solution will be found in a fair amount of time. A heuristic function determines how near a state is to the desired outcome. It determines the cost of an optimum path between two states and is represented by h(n). The heuristic function’s value is always positive.