Page 1 of 1

So I experimented with pathfinding

Posted: Sat Jun 20, 2015 1:54 am
by wtg62
And... I'm very happy with the results!
https://dl.dropboxusercontent.com/u/556 ... star2.html

Now I understand the A* algorithm!

Re: So I experimented with pathfinding

Posted: Tue Jun 23, 2015 11:18 am
by testtubegames
Nice! That works great. I'm especially a fan of the 'go to mouse' setting. It's like I'm being chased by someone unrelenting.

Re: So I experimented with pathfinding

Posted: Wed Jun 24, 2015 1:43 am
by wtg62
Thanks!

I'm a fan of using Math.random() as a heuristic. :P
Not because it's efficient, but it looks cool.

Re: So I experimented with pathfinding

Posted: Thu Jun 25, 2015 11:28 am
by testtubegames
Whoa - thanks for pointing me in the direction of Math.random(). I wasn't too familiar with pathfinding - and it sent me down the rabbit-hole of reading about heuristics. (For instance, at first I was expecting this to be a random walk, which clearly it wasn't... quite.)

Interesting stuff. And I like how your tool helps me investigate the differences really easily. aka: "Huh, would Manhattan vs. Actual Distance be all that different? Let me run it and find the distance each takes."

Re: So I experimented with pathfinding

Posted: Thu Jul 02, 2015 10:26 pm
by wtg62
testtubegames wrote:Interesting stuff. And I like how your tool helps me investigate the differences really easily. aka: "Huh, would Manhattan vs. Actual Distance be all that different? Let me run it and find the distance each takes."
Yeah, and I learned that a whole lot of times, Manhattan and Actual are very similar in move cost!
Pretty cool, huh? :P