AI Search Algorithm Visualizers: BFS, DFS, UCS, A*, Greedy, Hill Climbing and More

AI search algorithms decide how a program finds a path through a graph or a state space. In these visualizers you build the graph yourself: add nodes and edges, set edge costs and heuristic values, choose the start and goal, and watch the frontier, the explored nodes and the final path appear step by step. Ten algorithms are covered — breadth-first, depth-first, uniform-cost, best-first, greedy best-first, A*, hill climbing, iterative deepening, bidirectional and beam search — and a comparison table shows which are complete and optimal and how many nodes each one expanded on your graph.

11 interactive simulations

Frequently asked questions

What is the difference between informed and uninformed search?

Uninformed algorithms (BFS, DFS, UCS, IDDFS, bidirectional search) use only the graph. Informed algorithms (greedy, A*, hill climbing, beam search) also use a heuristic estimate of the distance to the goal.

Which AI search algorithm finds the cheapest path?

Uniform-cost search always finds the cheapest path with positive costs, and A* does too when its heuristic is admissible — usually with far fewer expanded nodes.

Can I use my own graph?

Yes. Every page has an editor: add and move nodes, connect them, set the edge costs and heuristics, or start from a sample such as the Romania road map.

Explore more of the Virtual Lab