It just finds the smallest distance to the goal so its not advanced pathfinding try messing around with it its very very simple c- closest r- route o- obstacle p- pathfinding