An Introduction to Genetic Algorithms - Boente
An Introduction to Genetic Algorithms - Boente
An Introduction to Genetic Algorithms - Boente
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
2.<br />
3.<br />
Calculate the fitness f(x) of each string x in the population.<br />
Choose (with replacement) two parents from the current population with probability proportional <strong>to</strong><br />
each string's relative fitness in the population.<br />
Cross over the two parents (at a single randomly chosen point) with probability pc <strong>to</strong> form two<br />
offspring. (If no crossover occurs, the offspring are exact copies of the parents.) Select one of the<br />
offspring at random and discard the other.<br />
4.<br />
Mutate each bit in the selected offspring with probability pm, and place it in the new population.<br />
5.<br />
Go <strong>to</strong> step 2 until a new population is complete.<br />
6.<br />
Go <strong>to</strong> step 1.<br />
Chapter 4: Theoretical Foundations of <strong>Genetic</strong> <strong>Algorithms</strong><br />
The only difference between this and the standard simple GA is that only one offspring from each crossover<br />
survives. Thus, for population size n, a <strong>to</strong>tal of n recombination events take place. (This modification<br />
simplifies parts of the formalization.)<br />
In the formal model of Vose and Liepins, each string in the search space is represented by the integer i<br />
between 0 and 2 l 1 encoded by the string. For example, for l = 8, the string 00000111 would be represented<br />
by the integer 7. The population at generation t is represented by two real−valued vec<strong>to</strong>rs, and , each<br />
of length 2 l . The ith component of (denoted pi(t)) is the proportion of the population at generation t<br />
consisting of string i, and the ith component of (denoted si(t)) is the probability that an instance of string i,<br />
will be selected <strong>to</strong> be a parent at step 2 in the simple GA given above. For example, if l = 2 and the population<br />
consists of two copies of 11 and one copy each of 01 and 10,<br />
If the fitness is equal <strong>to</strong> the number of ones in the string,<br />
(For the purpose of matrix multiplication these vec<strong>to</strong>rs will be assumed <strong>to</strong> be column vec<strong>to</strong>rs, though they will<br />
often be written as row vec<strong>to</strong>rs.)<br />
The vec<strong>to</strong>r exactly specifies the composition of the population at generation t, and reflects the<br />
selection probabilities under the fitness function. These are connected via fitness: let F be a two−dimensional<br />
matrix such that Fi,j = 0 for i `j and Fi,i = f(i). That is, every entry of F is 0 except the diagonal entries ((i,i)),<br />
which give the fitness of the corresponding string i. Under proportional selection,<br />
104