http://www.perlmonks.org?node_id=331830


in reply to Evolving formulae

While this is of course cool, curve fitting (and things like Taylor's series) seem to be better ways to fight this problem. At least this works very well in dealing with functions.

I long remember reading "The two worst ways to solve a problem are genetic algorithms and neural networks". Worst -> Slowest. This isn't a knock at GA and NN, this is the truth, as written by AI purists themselves.

Loosely: You use the former when you know what "closer to right" means, but you don't know how to make something "more right". You use the latter when you know when the right answer, but you don't know how to get there.

The day we consign math to genetic algorithms, IMHO, is the day we stop understanding math. If you are trying to fit a function to data, there are better ways. Your write-up is of course cool and is well worth of the ++, just be advised the brute-force approach to mathematics...well...it isn't mathematics anymore.

Just like an infinite number of monkeys with typewriters will eventually come up with a Shakespearean tragedy, we could try to have todays fast computers mutate a formula until it gets close to a predefined goal
FYI -- when the predefined goal is the input numerical value for pi, then you know the goal, and you are there. Hence the above quote about the better methods for solving a problem. Pi is probably a very bad case, curve fitting would probably serve a better example and would have a more interesting fitness function.