If anyone curious about some historic examples here is the pathfinding code from the C&C/Red Alert games
>The path algorithm works by following a LOS path to the target. If it collides with an impassable spot, it uses an Edge following routine to get around it. The edge follower moves along the edge in a clockwise or counter clockwise fashion until finding the destination spot. The destination is determined by Find_Path. It is the first passable that can be reached (so it will handle the doughnut case, where there is a passable in the center of an unreachable area).
I was only able to win Warcraft 3 by learning to cheese the heavy enemies like demons by forcing them to pathfind along walls festooned with archers. It was funny but it wasn’t really fun.
It was experiences like that which made be briefly consider a career trying to make better game AI.
I guess the problem here is that if you have a few rocks in your path it will go around each rock to the opposite side for each rock. Rather than going to the side of the first rock, walking past all of the rocks, then coming back to the opposite side.
>The path algorithm works by following a LOS path to the target. If it collides with an impassable spot, it uses an Edge following routine to get around it. The edge follower moves along the edge in a clockwise or counter clockwise fashion until finding the destination spot. The destination is determined by Find_Path. It is the first passable that can be reached (so it will handle the doughnut case, where there is a passable in the center of an unreachable area).
https://github.com/electronicarts/CnC_Remastered_Collection/...
https://github.com/electronicarts/CnC_Remastered_Collection/...
(on a side note the comments are incredibly detailed, considering this is from 1993-95)