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


in reply to RE: Genetic Programming or breeding Perls
in thread Genetic Programming or breeding Perls

I notice you left out division---presumably you don't want to have to deal with errors from the eval statement?

Yup that was one of the reasons. It would have made the program longer that it already is.

Programs with errors in them are not a problem as long as they have different fitness values. For instance as long as program with one error in it has a higher fitness as a program with two errors in it. If all programs that do not evaluate correctly, result in the same fitness value there is no way for the algorithm to gradually move to a better solution.

GP works only if there are intermediate solutions.

Have Fun

  • Comment on RE: RE: Genetic Programming or breeding Perls