Function Search(graph, start, goal): frontier = new OrderedCollection parents = new HashTable add start to frontier add start to visited While frontier not empty: vertex = remove from frontier For each neighbor of vertex in graph: If neighbor is goal: SUCCESS Else If neighbor not in parents: add neighbor to frontier add neighbor:vertex to parents End If End For End While FAILURE End Function