by PartiallyTyped · 3y ago · 0 comments
To me, this looks like running multiple iterations of Dijkstra's. You start with Manhattan distance between nodes and finish. As you go through the maze, you update the dynamics of the current node, run dijkstra's, go to shortest path from here.
This also sounds a bit like IDA*, where you are also updating the heuristic as you go, but without the iterative deepening part.
In particular, in A*, the "to be explored" queue has to be kept sorted. This sorting dominates the compute time.
For example, using the "flood fill" method on an 8-bit processor, depending on the state of the maze, it took less than 3milliseconds (hand optimized assembly) to solve a maze. On a Cortex M4, with decently thought through maze representation, but not optimized beyond that, it takes under 1.5milliseconds. This is in the "don't need to bother" category.
This is a great article to start from: https://dl.acm.org/doi/10.5555/26011.26020
PDF version of this can be found online.
What we have done is extended it to be time based rather than distance based i.e. we take into account the motion parameters - acceleration, maximum speed on the straight and through different turns, distance and use that together to generate a cost table and then use the cost table to generate the fastest path.
Question; with A*, I assumed the issue was that you needed to backtrack to a promising node which could be very far from current position. But that is based on the assumption that A* is rooted in the start of the maze. The way you described this makes the backtracking seem like a non issue. I assume it is because you were changing the root to be the current node each time. Is this correct?