Hmmm. I really thought there would be a little more interest in this.
The thing is this algorithm really just calculates the best way to "connect the dots" between two fixed endpoints. A true pathfinding algorithm would discard unnecessary dots.
The method used is called simulated annealing. The cost function is distance. Two random points are chosen. 50% of the time the segment is reversed. 50% of the time the segment is inserted somewhere else along the path. In turn, whether each of these changes is implemented depends on a probability calculated from the change in cost. This means that most of the time a change will be made if it reduces cost, or the change may not be made at all. Occaisionally a change will be made that increases the cost.
It does not require recursion only iteration. The main difficulty in coding it is that array handling in OpFl is clumsy. Unless there is more interest expressed, I can't be bothered, since I don't need the function myself, I just thought it was an interesting experiment.