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


in reply to A Beginning Guide To Evolutionary Algorithms

Also, don't forget the variant on that that is evolutionary programming. An evolutionary algorithm takes a result, usually a string, and manipulates it so that it gets progressively better over time based on some scoring system.

Evolutionary programming does a similar thing, but with the program code itself.
An example of this is in the game GridWars, the team that came in second used a program that was all evolutionarily built. Interestingly enough, in that particular competition, speed matters very much, and that is one drawback of evolutionary programming - it tends to make bulky code that isn't always as fast as it could be.

I haven't yet tried it myself with eval, but I suspect it would be relatively easy to implement in Perl.

The idea is that you have your desired result, and instead of manipulating your string as the desired output - you manipulate the code that generates your output. Usually this means adding if/then statements and adjusting the values that they compare, and perhaps nesting them as well.
I haven't ever written in Lisp, but I have read that it is relatively easy to implement in Lisp.

This is a good way to let a program design a program for you. Then later on it usually benefits the speed of the program for a human to go over the final result and look for areas that it could be changed to optimize various parts of it.


-------------------------------------------------------------------
There are some odd things afoot now, in the Villa Straylight.