You are on page 1of 21

Evolutionary Computation

Evolution is the process of change in the genetic makeup of


populations.

Natural selection is the process by which organisms which have


traits that better enable them to adapt to environmental pressures
will tend to survive and reproduce in greater numbers than other
similar organisms, thereby increasing the existence of those
favorable traits in future generations.

Evolutionary computation endeavors to obtain approximate


solutions to problems such as optimization problems using the
evolutionary mechanisms involved in natural selection as its
paradigm.
Genetic Algorithms
A Section of DNA:

A A G T C C G
... ...
T T C A G G C
Some unicellular haploid organisms reproduce
sexually by a process called fusion.

Two adult cells first combine to form what is called


a transient diploid meiocyte.

The transient diploid meiocyte contains a


homologous pair of chromosomes, one from each
parent.

A child can obtain a given homolog from each


parent.
When homologous pairs align, we can have crossing over:

H o m o lo g o u s
p a ir s a lig n .

n o n r e c o m b in a n t
c h r o m a tid

H o m o lo g o u s r e c o m b in a n t
s e g m e n ts c h r o m a t id
c ro s s o v e r.

n o n r e c o m b in a n t
c h r o m a tid
Sometimes during cell division, errors occur
during the DNA replication process.

These errors are called mutations.

It is believed that mutations in germ cells are


the source of all variation in evolution.
Genetic algorithms use fusion in haploid
organisms as a model.

Candidate solutions to a problem are represented


by haploid individuals in a population.

Each individual has one chromosome.

The alphabet for the chromosome is not A, G, C,


and T as in actual organisms, but rather consists
of characters that represent solutions.
In each generation, a certain number of fit
individuals are allowed to reproduce.

Individuals representing better solutions are more


fit.

The chromosomes from two fit individuals then line


up and exchange genetic material (substrings of
the problem solution) by crossing-over.

Mutations possibly occur.

This results in the next generation of individuals.


When selecting individuals based on fitness, we do
not necessarily simply choose the most fit
individuals.

Rather, we may employ both exploitation and


exploration.

By exploitation we mean to exploit knowledge


already obtained by concentrating on regions that
look good.

By exploration we mean looking for new regions


without regard for how good they currently appear.
Example
Suppose our goal is to find the value of x that maximizes

 x 
f ( x)  sin   in the interval 0  x  255.
 256 

Of course the sin function is maximixed at π/2) or x = 128.

So, there is no practical reason for writing a genetic algorithm


to solve this problem.

We solve this problem with a genetic algorithm only


for illustration.
Steps in Constructing the Algorithm
1. Decide on an alphabet to represent solutions to the problem.

Because candidate solutions x are simply integers in the range 0 to 255,


. we can represent each individual (candidate solution) using 8 bits.

For example, the integer 189 is represented as

1 0 1111 0 1.
2. Decide on how many individuals make up a population.

In general, there can be thousands of individuals.


In this simple example, we will use 8 individuals.

3. Decide how to initialize the population.

Often this is done at random.


We will generate 8 numbers at random from the range 0 to 255.
4. Decide on how to evaluate fitness.

Our goal is to maximize

f ( x)  sin  x / 256.

So, the fitness of individual x is the value of this function.


5. Decide on which individuals to select for reproduction.

We combine exploration with exploitation as follows:

The fitnesses are normalized by dividing each fitness by


the sum of all the fitnesses.

These normalized fitnesses are then used to determine cumulative fitness values,
which provide a wedge on a roulette wheel for each individual based on its fitness.
We generate a random number from the interval (0,1].

That number will fall in the range assigned to precisely one individual;
this is the individual chosen.

This process is performed 8 times.


Suppose the individuals chosen for reproduction are as follows:

6. Determine how to perform cross-overs and mutations.


First, we randomly pair individuals, resulting in 4 pairs:
For each pair, we randomly select two points along the individuals.

Genetic material between the crossover points is exchanged.

Note that if the second point appears before the first point in the individual,
crossover is performed by wrapping around.

The average fitness before crossover is 0.635, while that after crossover it is 0.792.
Determine how to perform mutations.

For each bit in each individual, we decide at random whether to flip the bit.

Mutation probabilities are commonly in the range .01 to .001.


7. Determine when to terminate.

We could terminate:

when some maximum number of generations is attained.

when some allotted amount of time has expired.

when the fitness of the most fit individual reaches a certain level.

For example, we could terminate when either 10,000 generations are produced
or when the fitness exceeds 0.999.
Note that Steps 2, 3, 5, and 7 are generic in the sense that
we can apply the strategies mentioned to most problems.

You might also like