algorithms of 7/17/2012 • Many flavors, each crafted for a specific use, some more complicated than others. • Learn basic BFS and DFS first as a foundation, before diving into the more complicated algorithms (e.g. A* or Dijkstra's) • BFS usage: Finding shortest path Thursday, July 19, 2012
entrance on a queue • Loop until exit found: • Pop queue • Is exit? • Place all possible directions available for the next step on the queue Thursday, July 19, 2012
each path (nodes/ vertices) at the same pace • As new child pathways appear, they’re “walked” at the same pace as their siblings Thursday, July 19, 2012
square/step is “walked”, it’s linked to its parent • When the exit is found, the path is simply reconstructed by traversing back up the list • All square/steps not in the solution are ignored Thursday, July 19, 2012