magical
fe76e83e98
i was accidentally using the previous coordinates to calculate the cost for each node, which means the A* search was effectively calculating the cost of the return trip instead of the forward path. doesn't affect the path at all - the start and end nodes are fixed, so it doesn't matter whether their costs are included or not - but it does mean that the cost being returned at the end was off by ((value at end point) - (value at start point)) compared to the expected value. |
||
---|---|---|
.. | ||
astar.py | ||
input | ||
sample1.in | ||
sol.py |