Search Algorithms

Depth First

This is the easiest there is no heuristics, nothing guarantee that the solution is optimal, in infinite tree not always find the solution, but easy to implement, can be upgraded with depth fence so you can limit the how deep will go.

Breadth First

This is a better one there is no heuristics, but it’s always find the optimal solution even in infinite tree, and it’s slightly different from the previous one. Here instead of go deep and try to find the solution, we examine each node every children and expand it from left to right.



In this page this is the best one, it’s use heuristics(Manhattan distance)  and always find the optimal solution in any tree. A* traverses along the graph through the path of the lowest know cost. It’s always leave higher cost path for the lower cost path and continue that until the solution is found.

Comments are closed.