A* Router

Download Source

Directions

Click and Release the mouse between two points to find a route between them. Doing So with the right mouse button allows you to test your own route, incase you think there is a better solution.\

Description

This is in A* router working on a navigation grid. The cost for moving across any given square is give by its color where dark implies cheaper and safer travelling.

The algorithm works via the standard A* algorithm, and then applies a simple smoothing algorithm to the produced route in order to produce a set of wp's with a minimal cost.

The map is generated via random overlapping circles of varying cost. They represent air defense threats in the main project that aircraft should minimize exposure to. The code is entirely generic though, and could be used for any routing situation, with any shaped search space. It functions equally well, in the situation of random noise, which is near impossible for humans.

Legend

Blue Line - Final path.

Blue area -> Routes explored. Closed nodes.

Purple Boundary -> Open List. places it was going to explore next.