Join GitHub today
Astar didn't found the shortest path, due to rounding errors. #1
The implementation of A* uses int variables for cost, but it at the same time supports diagonal lines, which mean that it doesn't allways find the shortest path.
The patch changes the types to doubles, removes the floor calls, and fixes a problem in the function hueristic. The hueristic function should be "optimistic", understod as the hueristiccost should never be higher than the actual cost of getting to the goal.