2. Defination
• A genetic algorithm (or short GA) is a search
technique used in computing to find true or
approximate solutions to optimization and
search problems.
• A genetic algorithm maintains a population of
candidate solutions for the problem at hand,
and makes it evolve by iteratively applying
a set of stochastic operators.
2
3. GA Quick Overview
• Developed: USA in the 1970’s
• Early names: J. Holland, K. DeJong, D. Goldberg
• Inspired by the biological evolution process
• Uses concepts of “Natural Selection” and “Genetic
Inheritance” (Darwin 1859)
• Typically applied to:
– discrete optimization
• Attributed features:
– not too fast
– good heuristic for combinatorial problems
• Special Features:
– Traditionally emphasizes combining information from good parents
(crossover)
– many variants, e.g., reproduction models, operators
3
4. Classes of Search Techniques
Search Techniques
Calculus Base
Techniques
Guided Random Search
Techniques
Enumerative
Techniques
BFS
DFS Dynamic
Programming
Tabu Search
Hill Climbing
Simulated
Annealing
Evolutionary
Algorithms
Genetic
Programming
Genetic
Algorithms
Fibonacci Sort
4
5. Genetic Algorithms Techniques
• GAs are a particular class of evolutionary algorithms. The
techniques common to all GAs are:
Encoding (Representation)
Selection
Crossover (also called recombination)
Mutation
• GAs are best used when the objective function is:
Discontinuous
Highly nonlinear
Stochastic
Has unreliable or undefined derivatives
5
6. Biological Terminology
• Gene: A single encoding of part of the
solution space, i.e. either single bits or
short blocks of adjacent bits that encode
an element of the candidate solution.
• Chromosome: A string of genes that
represents a solution.
• Population: The number of chromosomes
available to test.
0 1 1 0
1
0 1 1 0
0 1 1 0
0 1 1 0
0 1 1 0
0 1 1 0
0 1 1 0 6
8. 1. Encoding
• The first step in the implementation of GA is
encoding i.e. the representation of a problem
solution/ chromosome.
• Some of the different encoding techniques are:
Binary Encoding
Permutation Encoding
Value Encoding
Tree Encoding
8
10. 2. Selection
• After encoding and the random generation of an initial
population the next step in GA is the selection of
chromosomes which would take part as parents in
crossover.
• The main problem is how to carryout this selection. As
per Darwin’s evolution theory, the fittest chromosomes
survive through generations and are most likely to take
part in crossover and create offspring.
• Some of the well known techniques of selection are”
Tournament selection
Roulette wheel selection
Steady state selection
Rank selection
10
11. 3. Crossover
• After the selection of chromosomes for
crossover, the next task is to decide how to
carryout the process of crossover so that genes
from two parents can be recombined and
children are created.
• Crossover can be carried out in a number of
ways. Some of them are shown in next slide.
11
14. 4. Mutation
• The main aim of carrying out mutation is to
induce a certain level of diversity into
population so that GA can be prevented from
getting trapped into a local optimum.
• Like crossover the decision of how to perform
mutation, also, depends upon the type of
encoding being used. The different mutation
techniques, for different types of encoding are
shown is next slide.
14
16. References
• W. Williams, Genetic Algorithms: A Tutorial,
http://web.umr.edu/~ercal/387/slides/GATutorial.ppt
• A. Eiben, J. Smith, Introduction to Evolutionary Computing, Genetic Algorithms,
http://www.cs.vu.nl/~jabekker/ec0607/slides/Lecture03-Chapter3-
GeneticAlgorithms.ppt
• R. Horst and P.M. Pardalos(eds.), Handbook of Global Optimization, Kluwer,
Dordrecht 1995.
• M. Mitchell, An Introduction To Genetic Algorithms, Cambridge, MA: MIT Press,
1996.
• C. Darwin. On the Origin of Species by Means of Natural Selection; or, the
Preservation of flavored Races in the Struggle for Life. John Murray, London, 1859.
• W. D. Hillis. Co-Evolving Parasites Improve Simulated Evolution as an Optimization
Procedure. Artificial Life 2, vol 10, Addison-Wesley, 1991.
• J. H. Holland. Adaptation in Natural and Artificial Systems. The University of
Michigan Press, Ann Arbor, Michigan, 1975.
• Z. Michalewicz. Genetic Algorithms + Data Structures = Evolution Programs.
Springer-Verlag, Berlin, third edition, 1996.
• M. Sipper. Machine Nature: The Coming Age of Bio-Inspired Computing. McGraw-
Hill, New-York, first edition, 2002.
• M. Tomassini. Evolutionary algorithms. In E. Sanchez and M. Tomassini, editors,
Towards Evolvable Hardware, volume 1062 of Lecture Notes in Computer Science,
pages 19-47. Springer-Verlag, Berlin, 1996.
16
18. Encoding
• The first stage is to map solution characteristics
in the format of a chromosome string.
• The chromosome scheme determines not only
how effective the problem is structured, but also
how efficient the genetic operators are used.
• The chromosome representation consists of two
section:
The parts section (P)
The machines section (M)
18
19. Continued…
• Therefore, the solution is represented as a vector ‘S’
of size (M+P) in which each element is a member
of the set 1,2,. . .,C.
(C= No. of Cells)
as depicted in Fig.
19
• Where the possible maximum number of cells(C) is
defined as
C = (number of machines/2) + 1
Sample
Solution,
‘S’
20. Population Initialization
• Another stage is to generate a set of initial
solutions, called population. The number of
initial solutions to be contained in the
population is called population size.
• A procedure was developed in this research to
generate a random initial population while
constraints are satisfied, i.e. each machine and
each part should be assigned to only one cell.
20
21. Fitness function
• In GA implementation, a fitness function is used
to evaluate and reproduce new chromosomes,
called offspring for the generations to come.
• The purpose of the fitness function is to
measure the goodness of the candidate solutions
in the population with respect to the objective
and constraint functions of the model.
• The fitness value of a chromosome in the
proposed algorithm is maximizing the grouping
efficacy.
21
22. Crossover
• In this paper, the offspring are generated by
simple one-point crossover
22
S1
S2
23. Mutation
• A simple single point mutation operator is used
for mutation. The mutation operator randomly
changes the gene’s value according to a small
mutation probability. In this scheme an
individual is randomly chosen from the
population and a random number, l є {1,. .
.,M+P} is generated. Then, the number, c, in
position ‘l’ of the selected individual is
replaced by a c/ є {1,. . .,C-c}.
23
25. Selection
• The Roulette Wheel selection procedure is proposed.
However, Roulette Wheel selection is known to have
important drawbacks:
First, it may lead to immature (early)
convergence
Second, selection pressure is lost in the last steps
of the algorithm.
• To overcome this problem, relative fitness values are
used instead of absolute fitness values as follows:
25
where
rj is the relative fitness of individual ‘j’, f(i) is the absolute
fitness of individual ‘i’ and ‘P’ is the population.