FWIW, I'm still watching! Thanks for doing this series.
@gbegerow28 күн бұрын
Btw.A* without heuristic is jus Dijkstra.
@carterthaxton28 күн бұрын
Yup, exactly. Pathfinding has a dijkstra_partial function, which could have also been used here to obtain all of the shortest paths. It accepts a stop function, which you can use to stop once you reach a cost greater than the minimum, instead of stopping as soon as you find the exit.
@aderakin539529 күн бұрын
Pathfinding seems nice to use. I was using petgraph, but building the graph was a little annoying, so I implemented Dijkstra manually. For part 2, we can also use the result from the Dijkstra run to fill back all possible positions on the minimum cost path by retracing the cost.
@chrisbiscardi29 күн бұрын
pathfinding is more directly applicable for advent of code I think, but all of the production usage I've seen in services, etc is using petgraph so its nice to get to know it too since aoc can be a good way to get an introduction.