Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 58

Evolutionary Algorithms

Asst. Prof.
Dr. Mohammed Najm Abdullah
Evolutionary Algorithms
Evolution is a novel system that has led to
the creation of great systems in the natural
and artificial world. The systems we see
today show tremendous performance, in
part because they have adapted to and
evolved from the changing environment
over time
Evolution is a predominant phenomenon
in most natural systems. In artificial
systems, evolution is attributed to the study
of the success of this phenomenon in its
natural counterparts. We see that these
systems keep getting better over time as a
result of continuous adjustment,
adaptation, and learning.
Usually grouped under the term evolutionary
computation or evolutionary algorithms, we find the
domains of genetic algorithms, evolution strategies,
evolutionary programming and genetic programming.
They all share a common conceptual base of
simulating the evolution of individual structures via
processes of selection, recombination and mutation
reproduction and thereby producing better solutions.
The processes depend on the perceived performance
of the individual structures as defined by the problem.
The procedure is then iterated as illustrated in Figure
below:
Darwinian evolutionary theory principles of
reproduction and natural selection (survival of the
fittest) are the base of the evolutionary theory:
• individuals who survive are the ones best adapted
to exist in their environment due to the
possession of variations;
• individuals that survive will reproduce and
transmit these variations to their offspring;
• as time and generations continue, many
adaptations are perpetuated in individuals until
new species evolve in forms different from the
common ancestor;
• traits which are beneficial to the survival of an
organism in a particular environment tend to be
retained and passed on, increasing in frequency
within the population;
• trait which have low survival tend to decrease in
frequency;
• When environmental conditions change, traits that
were formally associated with low survival may
have greater survival.
The correspondence between natural evolution and
problem solving inspired by it is given in Figure
below:
The basic evolutionary algorithm is described below.
Evolutionary Algorithm
Step 1. Set t= 0;
Step 2. Randomly initialize the population P(t).
Repeat
Step 3.1. Evaluate individuals from P(t);
Step 3.2. Selection on P(t)
Let P’(t) be the set of selected individuals.
Step 3.3. Crossover on P’(t);
Step 3.4. Mutation on P’(t).
Step 3.5. Survival on P’(t).
Step 3.6. t=t+1.
Until t=number of iterations
How to Build an Evolutionary Algorithm?
In order to build an evolutionary algorithm there are a number
of steps that we have to perform:
 
1. Design a representation;
2. Find a way to initialize the population;
3. Design a way of mapping a genotype to a phenotype;
4. Design a way of evaluating an individual;
5. Decide how to select individuals to be parents (design a
selection mechanism);
6. Design suitable mutation operators;
7. Design suitable recombination operators;
8. Decide how to select individuals to be replaced;
9. Decide when to stop the algorithm.
The variants of evolutionary algorithms differ only in
technical details
In the case of Genetic Algorithms (GAs) the
solutions are represented as strings over a finite
alphabet;
 Solutions are represented as real-valued vectors
in Evolutionary (Evolution) Strategies (ES);
 In the case of Evolutionary Programming
(EP), solutions are finite state machines;
 Genetic Programming (GP) uses trees for
solution representation.
What are Genetic Algorithms
Why Genetic Algorithms?
Genetic Algorithms Background
• Directed search algorithms based on the
mechanics of biological evolution
• Developed by John Holland, University of
Michigan (1970’s)
– To understand the adaptive processes of natural
systems
– To design artificial systems software that retains
the robustness of natural systems
• Provide efficient, effective techniques for
optimization and machine learning
applications
• Widely-used today in business, scientific and
engineering circles
GA: Disadvantages
1. No guarantee for optimal solution within a finite time
2. Weak theoretical basis
3. Interdependency of genes
4. Parameter tuning is an issue
5. Often computationally expensive, i.e. slow
 
GA: Advantages
1. A robust search technique
2. No (little) knowledge (assumption) the problem space
3. Fairly simple to develop: low development costs
4. Easy to incorporate with other methods
5. Solutions are interpretable
6. Can be run interactively, i.e. accommodate user preference
7. Provide many alternative solutions
8. Acceptable performance at acceptable costs on a wide range of problems
9. Intrinsic parallelism (robustness, fault tolerance)
Some GA Application Types
Domain Application Types
Control gas pipeline, pole balancing, missile evasion, pursuit

Design semiconductor layout, aircraft design, keyboard


configuration, communication networks
Scheduling manufacturing, facility scheduling, resource allocation

Robotics trajectory planning

Machine Learning designing neural networks, improving classification


algorithms, classifier systems
Signal Processing filter design

Game Playing poker, checkers, prisoner’s dilemma

Combinatorial set covering, travelling salesman, routing, bin packing,


graph colouring and partitioning
Optimization
Classes of Search Techniques
General idea of Genetic Algorithms
PROCESS:-
Components of a GA
A problem to solve, and ...
• Encoding technique (gene, chromosome)
• Initialization procedure (creation)
• Evaluation function (environment)
• Selection of parents (reproduction)
• Genetic operators (mutation, recombination)
• Parameter settings (practice and art)
Simple Genetic Algorithm
{
initialize population;
evaluate population;
while TerminationCriteriaNotSatisfied
{
select parents for reproduction;
perform recombination and mutation;
evaluate population;
}
}
The GA Cycle of Reproduction
Encoding
Exercises
1. Show the first 3 cycles of genetic evolution for
optimizing the function y = x3 –27 in the interval 0 ≤ x ≤
12. Use set P = { 1100, 1010, 1011, 0011} as the initial
population.
2. Unlike the standard GA, suppose you devise a new type
of algorithm, where in each cycle you randomly pick up
M chromosomes and select good chromosomes from
these by a selection function, and keep copies of the
good schemata from the last cycle, the selected
population size taking into consideration of the two types
= N. Further, assume there is no crossover or mutation in
your algorithm. Can you analyze the performance of
your algorithm? Can you compare the performance with
that of a standard GA?
3.Take different synthetic functions and optimize them
using GA. What is the effect of changing crossover and
mutation rate? Repeat the experiment for Rastringen’s
function.

You might also like