Not only is that pathfinding, it sounds like an especially complex pathfinding algorithm that would be pretty challenging to implement efficiently.
In what way?
In what way?