Introduction to GA
Introduction to GA
Algorithms
• The author of this course material will not be held personally responsible, nor
liable for any damages, actual or consequential, for any posts by third parties
which may violate any law.
• This course material may contain copyrighted material the use of which has not
always been specifically authorized by the copyright owner
• Use of materials in the presentation constitutes a ‘fair dealing of any such
copyrighted material
• The material contained in this presentation is used without profit for research
and educational purposes only
Introduction to
Solving Optimization Problems
Introduction to Optimization
• An optimization problem is the problem of finding the best
solution from all feasible solutions.
• The act of obtaining the best result under given circumstances.
• Defined as the process of finding the conditions that give the
maximum or minimum of a function.
• Finding an optimum value that is either minimum or maximum
value.
• The optimum seeking methods are also known as mathematical
programming techniques and are generally studied as a part of
operations research.
Defining an Optimization Problem
• Economics is filled with optimization problems
We need some
tools to analyze
these
optimization
problems
Example:
2x − 6y = 11
or
y = (2x − 11) ÷ 6
Can we determine an optimum value for y?
Similarly, in the following case
3x + 4y ≥ 56.
Physical Behaviors:
Annealing process –> Simulated Annealing (SA)
Swarming of particle –> Particle Swarming Optimization (PSO)
Evolution
The process by which modern organisms have descended
from ancient ones
Microevolution
Heredity
Information needs to be passed on from one generation
to the next
Genetic Variation
There has to be differences in the characteristics of
individuals in order for change to occur
Differential Reproduction
Some individuals need to (get to) reproduce more than
others thereby increasing the frequency of their genes in
the next generation
Evolution
Heredity
Those who live compete for mates; only the winners pass
on their gene to the next generation
Variation Heredity
Differential Reproduction
A brief account on Evolution : Natural Selection
Note:
• GA is an iterative process.
• It is a searching technique.
• Working cycle with /
without convergence.
• Solution is not necessarily
guaranteed.
Genetic Algorithms : Detailed Framework
Optimization Problem Solving using GA
• For solving the optimization problem using GA, it is required to
identify the following:
• Objective function(s)
• Constraint(s)
• Input parameters
• Fitness evaluation (it may be algorithm or mathematical formula)
• Encoding
• Decoding
Salient Features of Simple GA
• Limitations
• Needs an effort to convert into binary from
• Accuracy depends on the binary representation
• Advantages
• Since operations with binary representation is faster, it provide a
faster implementations of all GA operators.
• Any optimization problem has it binary-coded GA implementation
Real Value Encoding
• Encoding
• Fitness Evaluation and Selection
• Mating pool
• Crossover Mutation
• Inversion
• Convergence test
Genetic Algorithm Selection
• Objective of GA selection
• Perform selection from a set of population,
• Choose the individuals in the population that will create
offspring for the next generation and how many offspring
each will create.
• Identify fittest individuals in the population in hopes that
their offspring will in turn have even higher fitness.
Fitness Evaluation in GA
• In GA, there is a necessity to create next generation
• The next generation should be such that it is toward the (global)
optimum solution
• Random population generation may not be a wiser strategy
• Better strategy follows the biological process: Selection
• Selection involves:
• Survival of the fittest
• Struggle for the existence
• Fitness evaluation is to evaluate the survivability of each
individual in the current population
Selection Operation in GA
Note :
• Here, the size of the mating pool is p% × N, for some p
• Convergence rate depends on p.
Roulette-Wheel Selection
• In this scheme, the probability for an individual being selected in
the mating pool is considered to be proportional to its fitness.
• It is implemented with the help of a wheel as shown
Roulette-Wheel Selection Mechanism
Roulette-Wheel Selection Mechanism
Roulette-Wheel Selection Mechanism : An Example
Roulette-Wheel Selection : Implementation
Input: A Population of size N with their fitness values
Output: A mating pool of size Np
Steps:
Roulette-Wheel Selection : Example
The probability that i-th individual will be pointed is
Roulette-Wheel Selection
• The observation is that the individual with higher fitness values will
guard the other to be selected for mating.
• This leads to a lesser diversity and hence fewer scope toward exploring
the alternative solution and also premature convergence or early
convergence with local optimal solution
Comparing Selection Strategies
• Usually, a selection scheme follows Darwin’s principle of ”Survival
of the fittest”.
• In other words, a selection strategy in GA is a process that favours
the selection of better individuals in the population for the
matting pool (so that better genes are inherited to the new
offspring) and hence search leads to the global optima.
• Encoding
• Fitness Evaluation and Selection
• Mating pool
• Crossover
• Mutation
• Inversion
• Convergence test
Reproduction Operation in Genetic Algorithm
Reproduction:
• Crossover
• Mutation
• Inversion
Mating Pool: Prior to crossover operation
• A mating pair (each pair consists of two strings) are selected at random.
Thus, if the size of mating pool is N, then N 2 mating pairs are formed.
[Random Mating]
• The pairs are checked, whether they will participate in reproduction or
not by tossing a coin, whose probability being pc. If pc is head, then the
parent will participate in reproduction. Otherwise, they will remain intact
in the population.
Crossover Operation
Thank you