26.12.2013 Views

AI - a Guide to Intelligent Systems.pdf - Member of EEPIS

AI - a Guide to Intelligent Systems.pdf - Member of EEPIS

AI - a Guide to Intelligent Systems.pdf - Member of EEPIS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

222<br />

EVOLUTIONARY COMPUTATION<br />

7.3 Genetic algorithms<br />

We start with a definition: genetic algorithms are a class <strong>of</strong> s<strong>to</strong>chastic search<br />

algorithms based on biological evolution. Given a clearly defined problem <strong>to</strong> be<br />

solved and a binary string representation for candidate solutions, a basic GA can<br />

be represented as in Figure 7.2. A GA applies the following major steps (Davis,<br />

1991; Mitchell, 1996):<br />

Step 1:<br />

Step 2:<br />

Represent the problem variable domain as a chromosome <strong>of</strong> a fixed<br />

length, choose the size <strong>of</strong> a chromosome population N, the crossover<br />

probability p c and the mutation probability p m .<br />

Define a fitness function <strong>to</strong> measure the performance, or fitness, <strong>of</strong> an<br />

individual chromosome in the problem domain. The fitness function<br />

establishes the basis for selecting chromosomes that will be mated<br />

during reproduction.<br />

Step 3: Randomly generate an initial population <strong>of</strong> chromosomes <strong>of</strong> size N:<br />

x 1 ; x 2 ; ...; x N<br />

Step 4:<br />

Calculate the fitness <strong>of</strong> each individual chromosome:<br />

f ðx 1 Þ; f ðx 2 Þ; ...; f ðx N Þ<br />

Step 5:<br />

Step 6:<br />

Step 7:<br />

Step 8:<br />

Step 9:<br />

Select a pair <strong>of</strong> chromosomes for mating from the current population.<br />

Parent chromosomes are selected with a probability related <strong>to</strong> their<br />

fitness. Highly fit chromosomes have a higher probability <strong>of</strong> being<br />

selected for mating than less fit chromosomes.<br />

Create a pair <strong>of</strong> <strong>of</strong>fspring chromosomes by applying the genetic<br />

opera<strong>to</strong>rs – crossover and mutation.<br />

Place the created <strong>of</strong>fspring chromosomes in the new population.<br />

Repeat Step 5 until the size <strong>of</strong> the new chromosome population<br />

becomes equal <strong>to</strong> the size <strong>of</strong> the initial population, N.<br />

Replace the initial (parent) chromosome population with the new<br />

(<strong>of</strong>fspring) population.<br />

Step 10: Go <strong>to</strong> Step 4, and repeat the process until the termination criterion is<br />

satisfied.<br />

As we see, a GA represents an iterative process. Each iteration is called a<br />

generation. A typical number <strong>of</strong> generations for a simple GA can range from 50<br />

<strong>to</strong> over 500 (Mitchell, 1996). The entire set <strong>of</strong> generations is called a run. At the<br />

end <strong>of</strong> a run, we expect <strong>to</strong> find one or more highly fit chromosomes.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!