SlideShare a Scribd company logo
1 of 29
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
CHAPTER 15
GENETIC ALGORITHM
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
General Introduction to GAs
 Genetic algorithms (GAs) are a technique to solve problems which
need optimization.
 GAs are a subclass of Evolutionary Computing and are
random search algorithms.
 GAs are based on Darwin’s theory of evolution.
 History of GAs:
• Evolutionary computing evolved in the 1960s.
• GAs were created by John Holland in the mid-1970s.
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Biological Background (1) – The Cell
 Every cell is a complex of many small “factories”
 working together.
 The center of this all is the cell nucleus.
 The nucleus contains the genetic information.
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Biological Background (2) – Chromosomes
 Genetic information is stored in the chromosomes.
 Each chromosome is build of DNA.
 Chromosomes in humans form pairs.
 There are 23 pairs.
 The chromosome is divided in parts: genes.
 Genes code for properties.
 The posibilities of the genes for one property is called: allele.
 Every gene has an unique position on the chromosome: locus.
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Biological Background (3) – Genetics
 The entire combination of genes is called genotype.
 A genotype develops into a phenotype.
 Alleles can be either dominant or recessive.
 Dominant alleles will always express from the genotype to the
fenotype.
 Recessive alleles can survive in the population for many
generations without being expressed.
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Biological Background (4) – Reproduction
 Reproduction of genetical
information:
• Mitosis,
• Meiosis.
 Mitosis is copying the same
genetic information to new
offspring: there is no
exchange of information.
 Mitosis is the normal way of
growing of multicell structures,
like organs.
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
 Meiosis is the basis of sexual
reproduction.
 After meiotic division 2 gametes
appear in the process.
 In reproduction two gametes
conjugate to a zygote wich will
become the new individual.
 Hence genetic information is
shared between the parents in
order to create new offspring.
Biological Background (5) – Reproduction
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Biological Background (6) – Natural Selection
 The origin of species: “Preservation of favorable variations and
rejection of unfavorable variations.”
 There are more individuals born than can survive, so there is a
continuous struggle for life.
 Individuals with an advantage have a greater chance for survive:
survival of the fittest. For example, Giraffes with long necks.
 Genetic variations due to crossover and mutation.
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Genetic Algorithm (1) – Search Space
 Most often one is looking for the
best solution in a specific subset
of solutions.
 This subset is called the search
space (or state space).
 Every point in the search space is
a possible solution.
 Therefore every point has a
fitness value, depending on the
problem definition.
 GAs are used to search the
search space for the best
solution, e.g. a minimum.
 Difficulties are the local minima
and the starting point of the
search.
0 100 200 300 400 500 600 700 800 900 1000
0
0.5
1
1.5
2
2.5
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Genetic Algorithm (2) – Basic Algorithm
 Starting with a subset of n randomly chosen solutions from the
search space (i.e. chromosomes).
This is the population.
 This population is used to produce a next generation of
individuals by reproduction.
 Individuals with a higher fitness have more chance to reproduce
(i.e. natural selection).
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Comparison of Natural and GA Terminology
Natural Genetic Algorithm
Chromosome
Gene
Allele
Locus
Genotype
Phenotype
String
Feature or character
Feature value
String position
Structure
Parameter set, a decoded structure
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Genetic Algorithm (3) – Basic Algorithm
Outline of the basic algorithm
0 START : Create random population of n chromosomes
1 FITNESS : Evaluate fitness f(x) of each chromosome in the
population
2 NEW POPULATION
1 REPRODUCTION/SELECTION : Based on f(x)
2 CROSS OVER : Cross-over chromosomes
3 MUTATION : Mutate chromosomes
3 REPLACE : Replace old with new population: the new generation
4 TEST : Test problem criterium
5 LOOP : Continue step 1 – 4 untill criterium is satisfied
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Flowchart of GA
• All individuals in population
evaluated by fitness function.
• Individuals allowed to
reproduce (selection),
crossover, mutate.
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Genetic Algorithm – Reproduction Cycle
1. Select parents for the mating pool
(size of mating pool = population size).
2. Shuffle the mating pool.
3. For each consecutive pair apply crossover.
4. For each offspring apply mutation (bit-flip independently for each
bit).
5. Replace the whole population with the resulting offspring.
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Genetic Algorithm – Coding
 Chromosomes are encoded by bitstrings.
 Every bitstring therefore is a solution but not necessarily the best
solution.
 The way bitstrings can code differs from problem to problem.
1
0
0
1
Either sequence of
on/off or the number
9
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Genetic Algorithm – Crossover (Single Point)
 Choose a random point on the two parents.
 Split parents at this crossover point.
 Create children by exchanging tails.
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
 Choose n random crossover points.
 Split along those points.
 Glue parts, alternating between parents.
 Generalization of 1 point.
Genetic Algorithm – Crossover (n Points)
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Genetic Algorithm – Uniform Crossover
Generate uniformly random number.
X1 = 0 1 1 0 0 0 1 0 1 0
X2 = 1 1 0 0 0 0 0 1 1 1
Uniformly generated = 1 0 0 0 0 0 1 0 0 0
As a result, the new population becomes,
X1 = 1 1 1 0 0 0 0 0 1 0
X2 = 0 1 0 0 0 0 1 1 1 1
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Genetic Algorithm – Mutation
 Alter each gene independently with a probability pm
 pm is called the mutation rate
• Typically between 1/pop_size and 1/ chromosome_length
00010101 0011001 01111000
00100100 10111010
11110000
11000101 01011000
01101010
11000101 01011000
01101010
00000000 00001000 00000010
10000010 00000010 00000000
00000000 00010000 00000000
00010000 00000000 01000000
00010101 00110001
01111010
10100110 10111000
11110000
11000101 01111000
01101010
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Genetic Algorithm – Selection
 Main idea: Better individuals get higher chance:
• Chances are proportional to fitness.
• Implementation: Roulette wheel technique
» Assign to each individual a part of the roulette wheel.
» Spin the wheel n times to select n individuals.
A C
1/6 = 17%
3/6 = 50%
B
2/6 = 33%
fitness(A) = 3
fitness(B) = 1
fitness(C) = 2
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Genetic Algorithm – An Example
 Simple problem: max x2 over {0, 1, …, 31}
 GA approach:
• Representation: binary code, e.g. 01101 ↔ 13
• Population size: 4
• 1-point xover, bitwise mutation
• Roulette wheel selection
• Random initialisation
 One generational cycle performed manually is shown here.
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Example : Selection
49%
14%31%
5%
2
1
3
4
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Example : Crossover
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Example : Mutation
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
 Has been subject of many (early) studies
• still often used as benchmark for novel Gas.
 Shows many shortcomings, e.g.
• Representation is too restrictive.
• Mutation & crossovers only applicable for bit-string & integer
representations.
• Selection mechanism sensitive for converging populations with
close fitness values.
Simple Genetic Algorithm
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Comparison of GA with Traditional
Optimization Techniques
 GA works with the coding of solution set and not with the solution
itself.
 GA uses population of solutions rather than a single solution for
searching.
 GA uses fitness function for evaluation rather the derivatives.
 GA uses probabilistic transition and not deterministic rules.
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
References
 Holland, J. (1992), Adaptation in natural and artificial systems ,
2nd Ed. Cambridge: MIT Press.
 Davis, L. (Ed.) (1991), Handbook of genetic algorithms. New York:
Van Nostrand Reinhold.
 Goldberg, D. (1989), Genetic algorithms in search, optimization
and machine learning. Addison-Wesley.
 Fogel, D. (1995), Evolutionary computation: Towards a new
philosophy of machine intelligence. Piscataway: IEEE Press.
 Bäck, T., Hammel, U., and Schwefel, H. (1997), ‘Evolutionary
computation: Comments on the history and the current state’, IEEE
Trans. On Evol. Comp. 1, (1)
“Principles of Soft Computing, 2nd
Edition”
by S.N. Sivanandam & SN Deepa
Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
Online Resources
 http://www.spectroscopynow.com
 http://www.cs.bris.ac.uk/~colin/evollect1/evollect0/index.htm
 IlliGAL (http://www-illigal.ge.uiuc.edu/index.php3)
 GAlib (http://lancet.mit.edu/ga/)

More Related Content

What's hot

NNFL 10- Guru Nanak Dev Engineering College
NNFL   10- Guru Nanak Dev Engineering CollegeNNFL   10- Guru Nanak Dev Engineering College
NNFL 10- Guru Nanak Dev Engineering CollegeMR. VIKRAM SNEHI
 
Introductory Session on Soft Computing
Introductory Session on Soft ComputingIntroductory Session on Soft Computing
Introductory Session on Soft ComputingAdri Jovin
 
Introduction to Genetic Algorithm
Introduction to Genetic AlgorithmIntroduction to Genetic Algorithm
Introduction to Genetic AlgorithmAdri Jovin
 
Artificial Intelligence: Artificial Neural Networks
Artificial Intelligence: Artificial Neural NetworksArtificial Intelligence: Artificial Neural Networks
Artificial Intelligence: Artificial Neural NetworksThe Integral Worm
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural networkDEEPASHRI HK
 
Deep Learning Tutorial | Deep Learning TensorFlow | Deep Learning With Neural...
Deep Learning Tutorial | Deep Learning TensorFlow | Deep Learning With Neural...Deep Learning Tutorial | Deep Learning TensorFlow | Deep Learning With Neural...
Deep Learning Tutorial | Deep Learning TensorFlow | Deep Learning With Neural...Simplilearn
 
Soft Computing-173101
Soft Computing-173101Soft Computing-173101
Soft Computing-173101AMIT KUMAR
 
Autoencoders for image_classification
Autoencoders for image_classificationAutoencoders for image_classification
Autoencoders for image_classificationCenk Bircanoğlu
 
Fuzzy Logic Final Report
Fuzzy Logic Final ReportFuzzy Logic Final Report
Fuzzy Logic Final ReportShikhar Agarwal
 
Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...
Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...
Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...Simplilearn
 
Simple Introduction to AutoEncoder
Simple Introduction to AutoEncoderSimple Introduction to AutoEncoder
Simple Introduction to AutoEncoderJun Lang
 
Artificial Intelligence, Machine Learning and Deep Learning with CNN
Artificial Intelligence, Machine Learning and Deep Learning with CNNArtificial Intelligence, Machine Learning and Deep Learning with CNN
Artificial Intelligence, Machine Learning and Deep Learning with CNNmojammel43
 
A neuro fuzzy decision support system
A neuro fuzzy decision support systemA neuro fuzzy decision support system
A neuro fuzzy decision support systemR A Akerkar
 
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...Simplilearn
 
Data Science - Part VIII - Artifical Neural Network
Data Science - Part VIII -  Artifical Neural NetworkData Science - Part VIII -  Artifical Neural Network
Data Science - Part VIII - Artifical Neural NetworkDerek Kane
 
Soft Computing
Soft ComputingSoft Computing
Soft ComputingMANISH T I
 
Intro to Deep Learning
Intro to Deep LearningIntro to Deep Learning
Intro to Deep LearningKushal Arora
 
Artificial Neural Network
Artificial Neural NetworkArtificial Neural Network
Artificial Neural NetworkKnoldus Inc.
 

What's hot (20)

NNFL 10- Guru Nanak Dev Engineering College
NNFL   10- Guru Nanak Dev Engineering CollegeNNFL   10- Guru Nanak Dev Engineering College
NNFL 10- Guru Nanak Dev Engineering College
 
Soft computing
Soft computingSoft computing
Soft computing
 
Introductory Session on Soft Computing
Introductory Session on Soft ComputingIntroductory Session on Soft Computing
Introductory Session on Soft Computing
 
Introduction to Genetic Algorithm
Introduction to Genetic AlgorithmIntroduction to Genetic Algorithm
Introduction to Genetic Algorithm
 
Artificial Intelligence: Artificial Neural Networks
Artificial Intelligence: Artificial Neural NetworksArtificial Intelligence: Artificial Neural Networks
Artificial Intelligence: Artificial Neural Networks
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural network
 
Deep Learning Tutorial | Deep Learning TensorFlow | Deep Learning With Neural...
Deep Learning Tutorial | Deep Learning TensorFlow | Deep Learning With Neural...Deep Learning Tutorial | Deep Learning TensorFlow | Deep Learning With Neural...
Deep Learning Tutorial | Deep Learning TensorFlow | Deep Learning With Neural...
 
Soft Computing-173101
Soft Computing-173101Soft Computing-173101
Soft Computing-173101
 
Autoencoders for image_classification
Autoencoders for image_classificationAutoencoders for image_classification
Autoencoders for image_classification
 
Fuzzy Logic Final Report
Fuzzy Logic Final ReportFuzzy Logic Final Report
Fuzzy Logic Final Report
 
Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...
Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...
Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...
 
Simple Introduction to AutoEncoder
Simple Introduction to AutoEncoderSimple Introduction to AutoEncoder
Simple Introduction to AutoEncoder
 
Artificial Intelligence, Machine Learning and Deep Learning with CNN
Artificial Intelligence, Machine Learning and Deep Learning with CNNArtificial Intelligence, Machine Learning and Deep Learning with CNN
Artificial Intelligence, Machine Learning and Deep Learning with CNN
 
A neuro fuzzy decision support system
A neuro fuzzy decision support systemA neuro fuzzy decision support system
A neuro fuzzy decision support system
 
Project presentation
Project presentationProject presentation
Project presentation
 
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
 
Data Science - Part VIII - Artifical Neural Network
Data Science - Part VIII -  Artifical Neural NetworkData Science - Part VIII -  Artifical Neural Network
Data Science - Part VIII - Artifical Neural Network
 
Soft Computing
Soft ComputingSoft Computing
Soft Computing
 
Intro to Deep Learning
Intro to Deep LearningIntro to Deep Learning
Intro to Deep Learning
 
Artificial Neural Network
Artificial Neural NetworkArtificial Neural Network
Artificial Neural Network
 

Viewers also liked

NNFL 11- Guru Nanak Dev Engineering College
NNFL   11- Guru Nanak Dev Engineering CollegeNNFL   11- Guru Nanak Dev Engineering College
NNFL 11- Guru Nanak Dev Engineering CollegeMR. VIKRAM SNEHI
 
NNFL 9 - Guru Nanak Dev Engineering College
NNFL  9 - Guru Nanak Dev Engineering CollegeNNFL  9 - Guru Nanak Dev Engineering College
NNFL 9 - Guru Nanak Dev Engineering CollegeMR. VIKRAM SNEHI
 
NNFL 13- Guru Nanak Dev Engineering College
NNFL   13- Guru Nanak Dev Engineering CollegeNNFL   13- Guru Nanak Dev Engineering College
NNFL 13- Guru Nanak Dev Engineering CollegeMR. VIKRAM SNEHI
 
NNFL 8 - Guru Nanak Dev Engineering College
NNFL  8 - Guru Nanak Dev Engineering CollegeNNFL  8 - Guru Nanak Dev Engineering College
NNFL 8 - Guru Nanak Dev Engineering CollegeMR. VIKRAM SNEHI
 
NNFL 14- Guru Nanak Dev Engineering College
NNFL   14- Guru Nanak Dev Engineering CollegeNNFL   14- Guru Nanak Dev Engineering College
NNFL 14- Guru Nanak Dev Engineering CollegeMR. VIKRAM SNEHI
 
NNFL 6 - Guru Nanak Dev Engineering College
NNFL  6 - Guru Nanak Dev Engineering CollegeNNFL  6 - Guru Nanak Dev Engineering College
NNFL 6 - Guru Nanak Dev Engineering CollegeMR. VIKRAM SNEHI
 
Fuzzy Logic ppt
Fuzzy Logic pptFuzzy Logic ppt
Fuzzy Logic pptRitu Bafna
 

Viewers also liked (7)

NNFL 11- Guru Nanak Dev Engineering College
NNFL   11- Guru Nanak Dev Engineering CollegeNNFL   11- Guru Nanak Dev Engineering College
NNFL 11- Guru Nanak Dev Engineering College
 
NNFL 9 - Guru Nanak Dev Engineering College
NNFL  9 - Guru Nanak Dev Engineering CollegeNNFL  9 - Guru Nanak Dev Engineering College
NNFL 9 - Guru Nanak Dev Engineering College
 
NNFL 13- Guru Nanak Dev Engineering College
NNFL   13- Guru Nanak Dev Engineering CollegeNNFL   13- Guru Nanak Dev Engineering College
NNFL 13- Guru Nanak Dev Engineering College
 
NNFL 8 - Guru Nanak Dev Engineering College
NNFL  8 - Guru Nanak Dev Engineering CollegeNNFL  8 - Guru Nanak Dev Engineering College
NNFL 8 - Guru Nanak Dev Engineering College
 
NNFL 14- Guru Nanak Dev Engineering College
NNFL   14- Guru Nanak Dev Engineering CollegeNNFL   14- Guru Nanak Dev Engineering College
NNFL 14- Guru Nanak Dev Engineering College
 
NNFL 6 - Guru Nanak Dev Engineering College
NNFL  6 - Guru Nanak Dev Engineering CollegeNNFL  6 - Guru Nanak Dev Engineering College
NNFL 6 - Guru Nanak Dev Engineering College
 
Fuzzy Logic ppt
Fuzzy Logic pptFuzzy Logic ppt
Fuzzy Logic ppt
 

Similar to NNFL 15- Guru Nanak Dev Engineering College

Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithmszamakhan
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsDerek Kane
 
evolutionary algo's.ppt
evolutionary algo's.pptevolutionary algo's.ppt
evolutionary algo's.pptSherazAhmed103
 
A Review On Genetic Algorithm And Its Applications
A Review On Genetic Algorithm And Its ApplicationsA Review On Genetic Algorithm And Its Applications
A Review On Genetic Algorithm And Its ApplicationsKaren Gomez
 
Swarm assignment 1
Swarm assignment 1Swarm assignment 1
Swarm assignment 1OmKushwaha7
 
Genetic algorithm raktim
Genetic algorithm raktimGenetic algorithm raktim
Genetic algorithm raktimRaktim Halder
 
Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Raktim Halder
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4Nandhini S
 
Genetic algorithms full lecture
Genetic algorithms full lectureGenetic algorithms full lecture
Genetic algorithms full lecturesadiacs
 
Introduction to Genetic Algorithms and Evolutionary Computation
Introduction to Genetic Algorithms and Evolutionary ComputationIntroduction to Genetic Algorithms and Evolutionary Computation
Introduction to Genetic Algorithms and Evolutionary ComputationAleksander Stensby
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithmsAmna Saeed
 
Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Kapil Khatiwada
 
Pso kota baru parahyangan 2017
Pso kota baru parahyangan 2017Pso kota baru parahyangan 2017
Pso kota baru parahyangan 2017Iwan Sofana
 

Similar to NNFL 15- Guru Nanak Dev Engineering College (20)

GA.pptx
GA.pptxGA.pptx
GA.pptx
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic Algorithms
 
Extensive Survey on Datamining Algoritms for Pattern Extraction
Extensive Survey on Datamining Algoritms for Pattern ExtractionExtensive Survey on Datamining Algoritms for Pattern Extraction
Extensive Survey on Datamining Algoritms for Pattern Extraction
 
evolutionary algo's.ppt
evolutionary algo's.pptevolutionary algo's.ppt
evolutionary algo's.ppt
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
A Review On Genetic Algorithm And Its Applications
A Review On Genetic Algorithm And Its ApplicationsA Review On Genetic Algorithm And Its Applications
A Review On Genetic Algorithm And Its Applications
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Chapter12.ppt
Chapter12.pptChapter12.ppt
Chapter12.ppt
 
Swarm assignment 1
Swarm assignment 1Swarm assignment 1
Swarm assignment 1
 
Demonstration1 G As
Demonstration1   G AsDemonstration1   G As
Demonstration1 G As
 
Genetic algorithm raktim
Genetic algorithm raktimGenetic algorithm raktim
Genetic algorithm raktim
 
Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4
 
Genetic algorithms full lecture
Genetic algorithms full lectureGenetic algorithms full lecture
Genetic algorithms full lecture
 
Machine learning
Machine learningMachine learning
Machine learning
 
Introduction to Genetic Algorithms and Evolutionary Computation
Introduction to Genetic Algorithms and Evolutionary ComputationIntroduction to Genetic Algorithms and Evolutionary Computation
Introduction to Genetic Algorithms and Evolutionary Computation
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)
 
Pso kota baru parahyangan 2017
Pso kota baru parahyangan 2017Pso kota baru parahyangan 2017
Pso kota baru parahyangan 2017
 

Recently uploaded

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 

Recently uploaded (20)

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 

NNFL 15- Guru Nanak Dev Engineering College

  • 1. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. CHAPTER 15 GENETIC ALGORITHM
  • 2. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. General Introduction to GAs  Genetic algorithms (GAs) are a technique to solve problems which need optimization.  GAs are a subclass of Evolutionary Computing and are random search algorithms.  GAs are based on Darwin’s theory of evolution.  History of GAs: • Evolutionary computing evolved in the 1960s. • GAs were created by John Holland in the mid-1970s.
  • 3. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Biological Background (1) – The Cell  Every cell is a complex of many small “factories”  working together.  The center of this all is the cell nucleus.  The nucleus contains the genetic information.
  • 4. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Biological Background (2) – Chromosomes  Genetic information is stored in the chromosomes.  Each chromosome is build of DNA.  Chromosomes in humans form pairs.  There are 23 pairs.  The chromosome is divided in parts: genes.  Genes code for properties.  The posibilities of the genes for one property is called: allele.  Every gene has an unique position on the chromosome: locus.
  • 5. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Biological Background (3) – Genetics  The entire combination of genes is called genotype.  A genotype develops into a phenotype.  Alleles can be either dominant or recessive.  Dominant alleles will always express from the genotype to the fenotype.  Recessive alleles can survive in the population for many generations without being expressed.
  • 6. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Biological Background (4) – Reproduction  Reproduction of genetical information: • Mitosis, • Meiosis.  Mitosis is copying the same genetic information to new offspring: there is no exchange of information.  Mitosis is the normal way of growing of multicell structures, like organs.
  • 7. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.  Meiosis is the basis of sexual reproduction.  After meiotic division 2 gametes appear in the process.  In reproduction two gametes conjugate to a zygote wich will become the new individual.  Hence genetic information is shared between the parents in order to create new offspring. Biological Background (5) – Reproduction
  • 8. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Biological Background (6) – Natural Selection  The origin of species: “Preservation of favorable variations and rejection of unfavorable variations.”  There are more individuals born than can survive, so there is a continuous struggle for life.  Individuals with an advantage have a greater chance for survive: survival of the fittest. For example, Giraffes with long necks.  Genetic variations due to crossover and mutation.
  • 9. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Genetic Algorithm (1) – Search Space  Most often one is looking for the best solution in a specific subset of solutions.  This subset is called the search space (or state space).  Every point in the search space is a possible solution.  Therefore every point has a fitness value, depending on the problem definition.  GAs are used to search the search space for the best solution, e.g. a minimum.  Difficulties are the local minima and the starting point of the search. 0 100 200 300 400 500 600 700 800 900 1000 0 0.5 1 1.5 2 2.5
  • 10. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Genetic Algorithm (2) – Basic Algorithm  Starting with a subset of n randomly chosen solutions from the search space (i.e. chromosomes). This is the population.  This population is used to produce a next generation of individuals by reproduction.  Individuals with a higher fitness have more chance to reproduce (i.e. natural selection).
  • 11. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Comparison of Natural and GA Terminology Natural Genetic Algorithm Chromosome Gene Allele Locus Genotype Phenotype String Feature or character Feature value String position Structure Parameter set, a decoded structure
  • 12. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Genetic Algorithm (3) – Basic Algorithm Outline of the basic algorithm 0 START : Create random population of n chromosomes 1 FITNESS : Evaluate fitness f(x) of each chromosome in the population 2 NEW POPULATION 1 REPRODUCTION/SELECTION : Based on f(x) 2 CROSS OVER : Cross-over chromosomes 3 MUTATION : Mutate chromosomes 3 REPLACE : Replace old with new population: the new generation 4 TEST : Test problem criterium 5 LOOP : Continue step 1 – 4 untill criterium is satisfied
  • 13. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Flowchart of GA • All individuals in population evaluated by fitness function. • Individuals allowed to reproduce (selection), crossover, mutate.
  • 14. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.
  • 15. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Genetic Algorithm – Reproduction Cycle 1. Select parents for the mating pool (size of mating pool = population size). 2. Shuffle the mating pool. 3. For each consecutive pair apply crossover. 4. For each offspring apply mutation (bit-flip independently for each bit). 5. Replace the whole population with the resulting offspring.
  • 16. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Genetic Algorithm – Coding  Chromosomes are encoded by bitstrings.  Every bitstring therefore is a solution but not necessarily the best solution.  The way bitstrings can code differs from problem to problem. 1 0 0 1 Either sequence of on/off or the number 9
  • 17. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Genetic Algorithm – Crossover (Single Point)  Choose a random point on the two parents.  Split parents at this crossover point.  Create children by exchanging tails.
  • 18. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.  Choose n random crossover points.  Split along those points.  Glue parts, alternating between parents.  Generalization of 1 point. Genetic Algorithm – Crossover (n Points)
  • 19. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Genetic Algorithm – Uniform Crossover Generate uniformly random number. X1 = 0 1 1 0 0 0 1 0 1 0 X2 = 1 1 0 0 0 0 0 1 1 1 Uniformly generated = 1 0 0 0 0 0 1 0 0 0 As a result, the new population becomes, X1 = 1 1 1 0 0 0 0 0 1 0 X2 = 0 1 0 0 0 0 1 1 1 1
  • 20. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Genetic Algorithm – Mutation  Alter each gene independently with a probability pm  pm is called the mutation rate • Typically between 1/pop_size and 1/ chromosome_length 00010101 0011001 01111000 00100100 10111010 11110000 11000101 01011000 01101010 11000101 01011000 01101010 00000000 00001000 00000010 10000010 00000010 00000000 00000000 00010000 00000000 00010000 00000000 01000000 00010101 00110001 01111010 10100110 10111000 11110000 11000101 01111000 01101010
  • 21. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Genetic Algorithm – Selection  Main idea: Better individuals get higher chance: • Chances are proportional to fitness. • Implementation: Roulette wheel technique » Assign to each individual a part of the roulette wheel. » Spin the wheel n times to select n individuals. A C 1/6 = 17% 3/6 = 50% B 2/6 = 33% fitness(A) = 3 fitness(B) = 1 fitness(C) = 2
  • 22. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Genetic Algorithm – An Example  Simple problem: max x2 over {0, 1, …, 31}  GA approach: • Representation: binary code, e.g. 01101 ↔ 13 • Population size: 4 • 1-point xover, bitwise mutation • Roulette wheel selection • Random initialisation  One generational cycle performed manually is shown here.
  • 23. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Example : Selection 49% 14%31% 5% 2 1 3 4
  • 24. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Example : Crossover
  • 25. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Example : Mutation
  • 26. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved.  Has been subject of many (early) studies • still often used as benchmark for novel Gas.  Shows many shortcomings, e.g. • Representation is too restrictive. • Mutation & crossovers only applicable for bit-string & integer representations. • Selection mechanism sensitive for converging populations with close fitness values. Simple Genetic Algorithm
  • 27. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Comparison of GA with Traditional Optimization Techniques  GA works with the coding of solution set and not with the solution itself.  GA uses population of solutions rather than a single solution for searching.  GA uses fitness function for evaluation rather the derivatives.  GA uses probabilistic transition and not deterministic rules.
  • 28. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. References  Holland, J. (1992), Adaptation in natural and artificial systems , 2nd Ed. Cambridge: MIT Press.  Davis, L. (Ed.) (1991), Handbook of genetic algorithms. New York: Van Nostrand Reinhold.  Goldberg, D. (1989), Genetic algorithms in search, optimization and machine learning. Addison-Wesley.  Fogel, D. (1995), Evolutionary computation: Towards a new philosophy of machine intelligence. Piscataway: IEEE Press.  Bäck, T., Hammel, U., and Schwefel, H. (1997), ‘Evolutionary computation: Comments on the history and the current state’, IEEE Trans. On Evol. Comp. 1, (1)
  • 29. “Principles of Soft Computing, 2nd Edition” by S.N. Sivanandam & SN Deepa Copyright © 2011 Wiley India Pvt. Ltd. All rights reserved. Online Resources  http://www.spectroscopynow.com  http://www.cs.bris.ac.uk/~colin/evollect1/evollect0/index.htm  IlliGAL (http://www-illigal.ge.uiuc.edu/index.php3)  GAlib (http://lancet.mit.edu/ga/)