Top1 Graph Searching and the Generic Search Algorithm2 Depth-first Search

2 Depth-first Search

In depth-first search, the frontier acts as a stack: the last node added is the firt node chosen.

AIspace Applet failed to load. Is Java enabled in your browser?

You can step though the search showing which nodes are selected in which order. The red path to the red outlined node was the last path selected. The neighbours of the red node are in blue, and the other nodes on the frontier are in green. (The old frontier contains the red node and the green nodes. The new frontier contains the blue nodes and the green nodes).

To see it again you can reset the search.


Artificial Intelligence online material, ©David Poole and Alan Mackworth, 2008

Top1 Graph Searching and the Generic Search Algorithm2 Depth-first Search