4 ms·
Cool! How does it instantly recognize when a path would lead into a trap?
by rosstex 11y ago
Cool! How does it instantly recognize when a path would lead into a trap?
- ahmetmsft 11y agoIt probably calculates the path in advance (note the "please wait" indicator appears just after you hit 'Solve') then it follows the path with an animation that gives you exactly the impression that it never falls into a trap as it goes.
- lovegraphs 11y agoThat's right, it does a breadth-first-search from the end-point immediately upon clicking the end-point; it then traces the path from the start-point, following the parent-pointers set during the BFS, painting the DOM in the process.
- je42 11y agoNot using A* ?