Grasp of the Fallen
Grasp of the Fallen / Engines / Artificial Intelligence / Pathfinding /

Breadth First

Updated: 6/15/2004

BreadthFirstSearch
node n, n', s
s.parent = null
// s is a node for the start
push s on Open
while Open is not empty
pop node n from Open
if n is a goal node
construct path
return success
for each successor n' of n
if n' has been visited already,
continue
n'.parent = n
push n' on Open
return failure // if no path found



©2004-2012 GraspoftheFallen.com - All Rights Reserved. An RPG game under development by Bruce Kirkpatrick | Have comments? Email Me