I have a table that looks like this
In table NPC - are AI like characters that move from one point to another. Player - a character that is controlled by the user.
In any moment the player character might move to any cell of the table. But NPC has a particular goal cell that they should reach while moving. For example, blue NPC needs to read blue cell.
Other NPC are also moving. My goal is to write an algorithm that would allow NPC to reach the cell using the shortest path. As far as I understand it is a typical shortest path problem.
My question is - is there some algorithm that particularly optimized to handle such workflows, or any algorithms will suffice - just with recalculating the path after each move?