News for hackers. Stuff that matters.
Re:Ask HN: Have you ever seen a pathfinding algorithm of thi... by Animats on Tuesday January 07, 2025 @11:34PM (#42630938)
I've done that something like that.[1] It's appropriate where there's a significant cost to detecting obstacles, because it tests few unnecessary cells.

It heads to the goal until an obstacle is reached, then follows the wall. Unusually, it forks and follows both the left and right wall simultaneously. It's not always optimal, but the optimal algorithms such as A* have to test more cells.

This algorithm runs my NPCs in Second Life.

[1] https://github.com/John-Nagle/lslutils/blob/master/npc/obsol...

Re:Ask HN: Have you ever seen a pathfinding algorithm of thi... by Farer on Wednesday January 08, 2025 @08:19AM (#42633889)
Oh, thank you. I'll have to take a look at the source code as well.