Chanaging the A* algorithm to create children nodes as it searches