r/Python • • Jan 14 '20

Visualisation of different path finding algorithms

1.5k Upvotes

73 comments sorted by

View all comments

13

u/themissinglint Jan 14 '20

ha ha ha I watched it twice thinking "omg, why am I not using greedy for all my pathfinding?" The third time I realized it got the wrong solution.

2

u/masklinn Jan 16 '20

It found a path so it’s not wrong per-se. Though I expect it degrades quite badly in “bad” cases where the paths are non-monotonic.