Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Path finding Algorithms : A* Vs Jump Point Search

I know that A* is better than Dijkstra's algorithm because it takes heuristic values into account, but from A* and Jump Point search which is the most efficient algorithm for finding the shortest path in an environment with obstacles? and what are the differences?

like image 475
Thilan.L Avatar asked Apr 26 '17 16:04

Thilan.L


People also ask

Is A * The best path finding algorithm?

A* pathfinding algorithm is arguably the best pathfinding algorithm when we have to find the shortest path between two nodes. A* is the golden ticket, or industry standard, that everyone uses. Dijkstra's Algorithm works well to find the shortest path, but it wastes time exploring in directions that aren't promising.

Which is better A * or Dijkstra?

A* algorithm is just like Dijkstra's algorithm, and the only difference is that A* tries to look for a better path by using a heuristic function, which gives priority to nodes that are supposed to be better than others while Dijkstra's just explore all possible ways.

Which is faster A * or Dijkstra?

Even though Dijkstra's algorithm and the A* algorithm both find the same shortest paths, the A* algorithm does it almost 60 times faster!

What is the fastest path finding algorithm?

Dijkstra's algorithm is used for our fastest path algorithm because it can find the shortest path between vertices in the graph. The coordinates on the arena are considered as the vertices in the graph.


1 Answers

Jump Point Search is an improved A* based on some conditions on the graph. Thus, if you meet these conditions (uniform-cost grid mostly), JPS is strictly better than A* (same optimality, best cases can be order of magnitudes better and worse case is probably the same complexity but with a slightly worse constant), but if you do not meet the conditions, you cannot use it.

The improvements of JPS over A* is basically, if you have a graph with an uniform cost function (it costs the same to go from A to B and from B to C, in the same direction), you can skip some steps in some cases and go directly from A to C without expanding nodes in B.

JPS is a pruning technique over A*, you remove cases you do not need to evaluate, because you know they will be sub-optimal. You know this because of the uniform-cost grid condition.
Conceptually, this is equivalent to using A* over a non uniform grid, where neighbouring nodes represent how far you can go in that direction without encountering an obstacle, with the cost of the jump you performed. So if you can go 10 nodes on the right without encountering an obstacle, you can reduce this (or jump directly to) a single node with a cost of 10*c, where c is the (constant) cost to go from one node to another on the right.

The original paper can be found here.

like image 61
Leherenn Avatar answered Nov 15 '22 19:11

Leherenn