r/programming • u/hazadess • Apr 23 '13
PathFinding algorithm, visually explained
http://qiao.github.io/PathFinding.js/visual/
2.2k
Upvotes
r/programming • u/hazadess • Apr 23 '13
View all comments
Show parent comment
1
u/finix Apr 24 '13
I'm not saying that precision is never of substantial value - quite the contrary -, but not only would I argue that in this case you're displaying a great deal of anal retentiveness for nothing but its own sake, you're also really rather wrong.
Meditate a moment over what it means when we compute "a measure by which we compare alternatives". We want to know how far from the goal the examined node is. Now, rather than coming up with the exact value, which would be 1) costly to compute and 2) defeat the purpose, we use a heuristic.
From [Wikipedia/Heuristic (computer science)](http://en.wikipedia.org/wiki/Heuristic_(computer_science)):
You might argue that it's turtles all the way up and A*, too, is a heuristic function, but as long as your heuristic is admissible, the solution will be optimal.
TDLR: The things listed under heuristic are heuristics.