Original Post
I'm sure this has been answered multiple times already, but search is disabled and a quick scan doesn't show anything in the two pages of posts in this forum, so: I'm writing an automated agent (call it a bot) that moves around in a MMORPG that has a grid-based world. I need pathfinding from point A to point B, but there's one kink: In this game, players can block your movement. If the agent is trying to walk from one end of the game map to another, there's no way for it to know that when it goes over this dead tree lying across a river that is one tile wide (a one lane road) has some idiot that went AFK on the bridge, for "laughs", and is blocking everyone. I need a good way of recalculating the path that won't involve a lot of searching over the same area I've already found a path for. The only thing I've come up with would be to break the original path (the one that assumes there are no blockages) into sections of a constant length. If the bot detects that its path has been blocked, it will look to re-solve the current section, taking the new obstacles into account. If that fails, it steps back one section (start walking backwards in the route at this point, also, to not piss off human players) and compound the two sections into one section and re-solve. Wash, rinse, repeat. If anything goes wrong (blocked in on both sides, for example), the game has a feature that allows you to respawn to a wraith NPC from almost anywhere in the game world. I'm sure my current idea will be enough, but I was hoping someone's already figured some similar problem out already and would care to enlighten me. Thanks in advance.