And the high-level structure of this algorithm is as follows: we first expand the planning graph, until we get to a graph that may contain a solution.That's what happens here in this part, and then we try to extract the solution which happens here and again in this loop, and see If this fails, we've got to expand the planning graph again. 