Informed (Heuristic) Search Strategies

Rajil TL
2 Min Read
Disclosure: This website may contain affiliate links, which means I may earn a commission if you click on the link and make a purchase. I only recommend products or services that I personally use and believe will add value to my readers. Your support is appreciated!

To solve large problems with large number of possible states, problem-specific knowledge needs to be added to increase the efficiency of search algorithms.

Heuristic Evaluation Functions

They calculate the cost of optimal path between two states. A heuristic function for sliding-tiles games is computed by counting number of moves that each tile makes from its goal state and adding these number of moves for all tiles.

It expands nodes in the order of their heuristic values. It creates two lists, a closed list for the already expanded nodes and an open list for the created but unexpanded nodes.

In each iteration, a node with a minimum heuristic value is expanded, all its child nodes are created and placed in the closed list. Then, the heuristic function is applied to the child nodes and they are placed in the open list according to their heuristic value. The shorter paths are saved and the longer ones are disposed.

It is best-known form of Best First search. It avoids expanding paths that are already expensive, but expands most promising paths first.

f(n) = g(n) + h(n), where

●      g(n) the cost (so far) to reach the node

●      h(n) estimated cost to get from the node to the goal

●      f(n) estimated total cost of path through n to goal. It is implemented using priority queue by increasing f(n).

It expands the node that is estimated to be closest to goal. It expands nodes based on f(n) = h(n). It is implemented using priority queue.

Disadvantage − It can get stuck in loops. It is not optimal.

 

Share This Article

Rajil TL is a SenseCentral contributor focused on tech, apps, tools, and product-building insights. He writes practical content for creators, founders, and learners—covering workflows, software strategies, and real-world implementation tips. His style is direct, structured, and action-oriented, often turning complex ideas into step-by-step guidance. He’s passionate about building useful digital products and sharing what works.

Leave a review