Commit Graph

2 Commits (52a2184a3ce1cb2a5918b960a253fc211effedf2)

Author SHA1 Message Date
magical fe76e83e98 day 17 fix cost calculation
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.
2023-12-17 06:42:34 +00:00
magical 14ef33326e day 17 solution
there's a small bug in the cost calculation which will be fixed in the
next commit
2023-12-17 06:26:31 +00:00