Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Quickest Route script.

Name: Anonymous 2008-05-12 16:28

This isn't a "Give me the script please" request, but more of a...
What would I tell the computer to do so I get this result.
Basically I'm writing a quick web-based form that will give the quickest route between two nodes.
Each node is linked to eight others, and there are 16 nodes in total.
I'm looking to create a program that, when given the name of starting and ending nodes, would display the quickest way through the nodes, listing the name of each node.
There is no travel time between the nodes, I just need the shortest amount of nodes to travel between.
Planning on writing this in Javascript, as it's the language I know.
Basically, without writing the actual code for me (I can do that myself) how would I go about getting the computer to navigate all possible different ways through the "map" and then select the shortest route?
More of a logic puzzle than programming puzzle I guess, but this board suits.

Name: Anonymous 2008-05-12 17:13

i'd have to agree with >>8 and speak out against dijkstra. implementing dijsktra is going to be waaay to much work for a noob like you; start with a http://en.wikipedia.org/wiki/Breadth-first_search and if it doesn't work you can optimize (but you'll have learned something in the meanwhile)

YOU WILL NOW THINK OF THE GAME WHENEVER YOU VISIT /prog/

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List