add weight to astar_path_length's call to astar_path