graph - Using Dijsktra's algorithm with unique distance between nodes -


for school project, friends , learning pathfinding , how exploit via simple exercise:

for group of ants going b, need travel through multiple nodes, 1 @ time.

i've read explanation dijsktra's algoritm, , wanted know if use in graph every distance between every node 1 unit. optimal ? or a* more appropriated case ?

edit:

since had knowledge on graph, bfs prefered because distance between node pre-computed, djisktra prefered when have absolutely nothing graph itself. see this post reference

if every edge has same cost, dijkstra's algorithm same breadth-first search. in case might implement bfs. it's easier.

if have way estimate how far point target, use a* instead. find best path faster in cases.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -