Subj : Re: Implementing A* algorithm To : comp.programming From : Gerry Quinn Date : Mon Jul 18 2005 01:25 pm In article <42db816d$0$782$3a628fcd@reader20.nntp.hccnet.nl>, Huub says... > Hi, > > I'm not a real good programmer, and I have a route problem. I have a > robot that has to find the shortest route through a maze. Options for > doing this are either the A* or Dijkstra's algorithm. My maze consists > of 15 nodes, with each node only connected to at least 1 of it's direct > neighbours. All distances between the nodes are the same. Since > wikipedia tells me that A* is faster than Dijkstra, I would like to know > how the weights work out for either a linked list or an array? A* is faster than Dijkstra only when the overhead of the more complicated calculation is balanced out by the usefulness of the distance heuristic. For 15 nodes, both should take about a microsecond, so it doesn't matter which you use. By 'weights', I can only assume you mean the length of each route. In you case you can take this as unity since all distances are the same. - Gerry Quinn .