Algorithms using evolutionary computation are called evolutionary algorithms (EAs). These algorithms apply
mechanisms of evolution such as selection, mutation, and recombination
(sex) to a population of individual computer programs in order to
evolve better program solutions to a problem without a human designing
Evolutionary algorithms generally use a few basic steps to evolve
(1) a population is filled with either completely
random programs or with programs that have some basic functionality
designed by the user.
(2) each generation the programs are subjected to the following
a. selection: a set of the best current programs are chosen, where
"best" is based on a user-specified desired behavior. Examples of
desired behavior range from simple programs that best solve a math
equation to complex programs which best control a robot to navigate a
b. random changes: the chosen
"best set" of programs undergoes mutation and crossover. Mutation is
often as simple as changing one line of code in the program to a random
line. Crossover involves splitting 2 programs in one or more places,
and combining pieces of the 2 different programs to create new programs.
c. the modified "best" programs are placed back in the population, as
well as enough copies to fill the population back to its original
level. The better a program is the more copies of itself get placed in
the new population.
3) At some point the algorithm is stopped and the best program(s) of the current population are given to the user.