SlideShare a Scribd company logo
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
GENETIC ALGORITHMS
Muhammad Adil Raja
Roaming Researchers, Inc.
August 12, 2014
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
OUTLINE
INTRODUCTION
BIOLOGICAL INSPIRATION
SEARCH SPACES
A GENETIC ALGORITHM
EXPERIMENTAL SETUP
GENETIC OPERATORS
APPLICATIONS
CONCLUSIONS
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
OUTLINE
INTRODUCTION
BIOLOGICAL INSPIRATION
SEARCH SPACES
A GENETIC ALGORITHM
EXPERIMENTAL SETUP
GENETIC OPERATORS
APPLICATIONS
CONCLUSIONS
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
OUTLINE
INTRODUCTION
BIOLOGICAL INSPIRATION
SEARCH SPACES
A GENETIC ALGORITHM
EXPERIMENTAL SETUP
GENETIC OPERATORS
APPLICATIONS
CONCLUSIONS
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
OUTLINE
INTRODUCTION
BIOLOGICAL INSPIRATION
SEARCH SPACES
A GENETIC ALGORITHM
EXPERIMENTAL SETUP
GENETIC OPERATORS
APPLICATIONS
CONCLUSIONS
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
OUTLINE
INTRODUCTION
BIOLOGICAL INSPIRATION
SEARCH SPACES
A GENETIC ALGORITHM
EXPERIMENTAL SETUP
GENETIC OPERATORS
APPLICATIONS
CONCLUSIONS
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
OUTLINE
INTRODUCTION
BIOLOGICAL INSPIRATION
SEARCH SPACES
A GENETIC ALGORITHM
EXPERIMENTAL SETUP
GENETIC OPERATORS
APPLICATIONS
CONCLUSIONS
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
OUTLINE
INTRODUCTION
BIOLOGICAL INSPIRATION
SEARCH SPACES
A GENETIC ALGORITHM
EXPERIMENTAL SETUP
GENETIC OPERATORS
APPLICATIONS
CONCLUSIONS
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
OUTLINE
INTRODUCTION
BIOLOGICAL INSPIRATION
SEARCH SPACES
A GENETIC ALGORITHM
EXPERIMENTAL SETUP
GENETIC OPERATORS
APPLICATIONS
CONCLUSIONS
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
INTRODUCTION TO GENETIC ALGORITHMS (GAS)
Genetic algorithms are inspired by Charles Darwin’s theory
of evolution.
Fall under the umbrella of evolutionary computing.
Idea came from John Holland.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
BIOLOGICAL INSPIRATION I
The idea is inspired from natural
evolutionary biological systems.
In natural biological evolutionary systems,
organisms are made of cells.
A cell is composed of a set of
chromosomes.
Chromosomes are found in the nucleus.
Chromosomes are made of DNA. FIGURE: Structure
of a Biological Cell
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
BIOLOGICAL INSPIRATION II
Sections of Chromosomes are called
genes.
DNA - deoxyribonucleic acid.
it is the genetic code that contains all the
information needed to build and maintain
an organism.
FIGURE:
Chromosome
Structure
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
BIOLOGICAL INSPIRATION III
Each organism has a distinct number of chromosomes.
In humans every cell contains 46 chromosomes (23 pairs).
Other organisms have different numbers.
A dog has 76 chromosomes per cell.
Chromosomes come in pairs.
These are called homologous pairs (homologs).
Homologs can be imagined as matching pairs.
But they are not exactly alike.
Like a pair of shoes they can be different.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
SOME JARGON I
Chromosomes are composed of DNA.
DNA (and consequently chromosomes) are made of
genes.
A chromosome contains hundreds of thousands of genes.
Trait: Each gene encodes a particular protein, e.g. eye
color.
Alleles: Possible settings for a trait (e.g. color can be blue,
brown or black).
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
SOME JARGON II
Locus: Each gene’s own position in chromosome.
Genome: Complete set of genetic material.
Genotype: A particular set of genes in a genome.
Phenotype: A genotype’s physical and apparent
characteristics. (e.g. color, height, intelligence etc.)
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
REPRODUCTION I
Crossover: (recombination): Happens during
reproduction.
Genes from parents recombine in a meaningful sense to
form a whole new chromosome.
Offspring.
They can be genetically mutated.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
REPRODUCTION II
Mutation: Elements of the DNA are randomly changed a
little bit.
This change is mainly caused during reproduction by errors
committed during copying genes from parents.
Fitness: A measure of success of the organism in a typical
ecosystem.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
SEARCH SPACES I
Space of all feasible solutions.
Each point in a search space represents
one feasible solution.
Each feasible solution can be marked by
its value or fitness for a problem.
Good solutions are desired.
It is often not possible to prove what is an
optimum solution.
FIGURE: A Non-Linear
Search Space
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
SEARCH SPACES II
Search spaces can be very non-linear.
Like a mountainous terrain.
Finding the optimum solution is the real challenge.
Many locally optimum solutions can exist.
One or few globally optimum solutions may also exist.
How to find the best one?
That is what optimization is all about.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
A GENETIC ALGORITHM I
Solutions to problems are actually evolved.
The algorithm starts with a set of randomly chosen
solutions.
The solutions can be good or really really bad.
Solutions are evaluated for their fitness.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
A GENETIC ALGORITHM II
Solutions from one population are taken and used to form
a new population of better solutions.
Solutions that are selected to form new offspring solutions
are selected according to their fitness.
The more suitable ones have more chances to reproduce.
The algorithm is repeated until some stopping criterion is
met.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
A GA LIFE CYCLE: THE PSEUDOCODE
A GA Life Cycle: The Pseudo Code
1. Create an initial population of candidate solutions to a given
problem.
2. Evaluation.
3. Selection.
4. Reproduction.
5. Evaluation.
6. Replacement.
7. Continue from 3.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
A TYPICAL GA BREEDING CYCLE
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
TABLE: Fiddle Parameters of a Typical GA Experiment
Parameter Value
Initial Population Size 300
Initial Tree Depth 6
Selection Tournament Selection & Roulette Wheel
Tournament Size 2
Genetic Operators Crossover and Mutation
Operators Probability Type Adaptive
Initial Operator probabilities 0.5 each
Survival Elitism and Generational
Generation Gap 1
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
SELECTION
Roulette Wheel Selection – Fitness Proportionate
Selection.
Tournament Selection.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
SOLUTION REPRESENTATION IN GAS I
Depending upon the problem and its formulation, a solution
can be represented in various ways in a GA.
Most notable representations are:
1. Binary string representation.
This is one of the most common way of representing a
solution in a GA.
The solution is represented as a string of binary numbers.
Akin to a chromosome in biology.
2. Integer-valued arrays – Integer programming (?).
3. Real-valued arrays – for continuous parameter optimization.
4. Complete computer programs – as in GP.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
SOLUTION REPRESENTATION IN GAS II
TABLE: Binary String Representation
Chromosome 1 1101100100110110
Chromosome 2 1101111000011110
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
CROSSOVER I
1. Randomly choose two individuals
(chromosomes/individuals).
2. Choose crossover points on each one of them.
3. Swap the sub-parts around crossover points to form new
offspring.
Respect Syntactic or semantic constraints.
The child should solve the problem somehow.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
CROSSOVER II
TABLE: Binary String Crossover
Chromosome 1 110110010 0110110
Chromosome 2 110111100 0011110
Child Chromosome 1 110110010 110111100
Child Chromosome 2 0110110 0011110
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
MUTATION I
1. Choose a newly created offspring.
2. Pick a random gene, or a few genes, on it.
3. Change its value to something else randomly – Change
allele.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
MUTATION II
TABLE: Binary String Mutation
Chromosome 1 1101100100110110
Chromosome 2 1101111010011110
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
SURVIVAL
Elitism
Replacement
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
FITNESS EVALUATION
Mean squared error (MSE).
Chi squared error.
Scaled mean squared error.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
APPLICATIONS OF GAS I
Applications are quite too many.
GA as a hammer.
A hammer that finds almost everything else as a nail.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
APPLICATIONS OF GAS II
In regression and classification.
Regression or Classification of nonlinear problems.
In Telecommunications: Speech quality estimation.
In Computer Networks: Network coding.
In Finance: In evolving effective bidding strategies.
In Clinical: Cancer detectors, seizure detectors, mental
health diagnosis etc.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
APPLICATIONS OF GAS III
In evolving chess players.
In evolving antenna designs.
Evolvable hardware.
Muhammad Adil Raja Genetic Algorithms
Introduction
Biological Inspiration
Search Spaces
A Genetic Algorithm
Experimental Setup
Genetic Operators
Applications
Conclusions
CONCLUSIONS
GAs are strong problem solving algorithms.
They can be applied to a large number of optimization
problems.
Alternative solution representations render them suitable
for a wide variety of problem domains.
They are easy to understand.
The analogue from biological evolution is quite helpful.
They are easy to implement and fun to use.
They can be used to solved difficult problems.
Particularly suitable for finding acceptable solutions to
otherwise intractable problems.
...
Muhammad Adil Raja Genetic Algorithms

More Related Content

PPTX
Genetic Algorithm
PPT
Genetic algorithms
PPT
PPTX
Genetic Algorithms
PPTX
Genetic algorithm raktim
PPTX
Genetic Algorithm by Example
PPTX
Genetic algorithm
PDF
Genetic Algorithms
Genetic Algorithm
Genetic algorithms
Genetic Algorithms
Genetic algorithm raktim
Genetic Algorithm by Example
Genetic algorithm
Genetic Algorithms

What's hot (20)

PPT
Genetic algorithm
PPTX
Genetic Algorithm
PPTX
MACHINE LEARNING - GENETIC ALGORITHM
PPTX
Flowchart of GA
PDF
Genetic Algorithms
PPTX
Genetic Algorithm
PDF
Genetic Algorithm (GA) Optimization - Step-by-Step Example
PPTX
Genetic algorithm
PPT
Genetic algorithm
PPTX
Deep Learning With Neural Networks
PPT
Genetic Algorithms - Artificial Intelligence
PPTX
Introduction to genetic algorithms
PPT
Introduction to Genetic Algorithms
PPTX
Genetic algorithm
PPTX
Genetic algorithm
PPTX
GENETIC ALGORITHM
PPT
Evolutionary-Algorithms.ppt
PPTX
Ga ppt (1)
PPTX
Genetic Algorithm
PPTX
Evolutionary Computing
Genetic algorithm
Genetic Algorithm
MACHINE LEARNING - GENETIC ALGORITHM
Flowchart of GA
Genetic Algorithms
Genetic Algorithm
Genetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic algorithm
Genetic algorithm
Deep Learning With Neural Networks
Genetic Algorithms - Artificial Intelligence
Introduction to genetic algorithms
Introduction to Genetic Algorithms
Genetic algorithm
Genetic algorithm
GENETIC ALGORITHM
Evolutionary-Algorithms.ppt
Ga ppt (1)
Genetic Algorithm
Evolutionary Computing
Ad

Viewers also liked (12)

PDF
Amiina Bakunowicz_MSc Thesis_NEURAL SELF-ORGANISING MAPS AND GENETIC ALGORITH...
PPTX
Genetic Algorithm
PPTX
Introduction to genetic programming
PDF
A Practical Schema Theorem for Genetic Algorithm Design and Tuning
PPTX
Genetic programming
ODP
Genetic Programming in Python
PDF
Introduction to Genetic Programming
PPTX
Genetic Algorithm
PPTX
Fuzzy Genetic Algorithm
PDF
Genetic Algorithms Made Easy
PDF
Simulated Binary Crossover
PPTX
Introduction to Genetic Algorithms
Amiina Bakunowicz_MSc Thesis_NEURAL SELF-ORGANISING MAPS AND GENETIC ALGORITH...
Genetic Algorithm
Introduction to genetic programming
A Practical Schema Theorem for Genetic Algorithm Design and Tuning
Genetic programming
Genetic Programming in Python
Introduction to Genetic Programming
Genetic Algorithm
Fuzzy Genetic Algorithm
Genetic Algorithms Made Easy
Simulated Binary Crossover
Introduction to Genetic Algorithms
Ad

Similar to Genetic Algorithms (20)

PDF
PDF
Data Science - Part XIV - Genetic Algorithms
PDF
Genetic Algorithm
PPTX
PPT
Demonstration1 G As
PDF
3_GO_Olesya_Genetic_AlgorithmsOPTIMZTION.p.pdf
PPTX
GA of a Paper 2012.pptx
PDF
Genetic Algorithm
PPTX
Genetic algorithm optimization technique.pptx
PPTX
Genetic algorithms
PDF
Introduction to Genetic Algorithms and Evolutionary Computation
PPTX
Optimization technique genetic algorithm
PPT
Introduction to Genetic algorithms
PDF
Genetic Algorithm in Machine Learning PPT by-Adi
PDF
09 genetic algorithms by Priyesh Marvi
PDF
genetic algorithms-artificial intelligence
PDF
Genetic algorithms
PPTX
Introduction to Evolutionary Algorithms
PPTX
Genetic Algorithm in Artificial Intelligence
PDF
presentation81-181212183201.pdf
Data Science - Part XIV - Genetic Algorithms
Genetic Algorithm
Demonstration1 G As
3_GO_Olesya_Genetic_AlgorithmsOPTIMZTION.p.pdf
GA of a Paper 2012.pptx
Genetic Algorithm
Genetic algorithm optimization technique.pptx
Genetic algorithms
Introduction to Genetic Algorithms and Evolutionary Computation
Optimization technique genetic algorithm
Introduction to Genetic algorithms
Genetic Algorithm in Machine Learning PPT by-Adi
09 genetic algorithms by Priyesh Marvi
genetic algorithms-artificial intelligence
Genetic algorithms
Introduction to Evolutionary Algorithms
Genetic Algorithm in Artificial Intelligence
presentation81-181212183201.pdf

More from adil raja (20)

PDF
ANNs.pdf
PDF
A Software Requirements Specification
PDF
NUAV - A Testbed for Development of Autonomous Unmanned Aerial Vehicles
PDF
DevOps Demystified
PDF
On Research (And Development)
PDF
Simulators as Drivers of Cutting Edge Research
PDF
The Knock Knock Protocol
PDF
File Transfer Through Sockets
PDF
Remote Command Execution
PDF
Thesis
PDF
CMM Level 3 Assessment of Xavor Pakistan
PDF
Data Warehousing
PDF
Implementation of a Non-Intrusive Speech Quality Assessment Tool on a Mid-Net...
PDF
Implementation of a Non-Intrusive Speech Quality Assessment Tool on a Mid-Net...
PDF
Real-Time Non-Intrusive Speech Quality Estimation for VoIP
PDF
VoIP
PDF
ULMAN GUI Specifications
PDF
Modeling the Effect of Packet Loss on Speech Quality: Genetic Programming Bas...
PDF
ULMAN-GUI
PDF
Modeling the Effect of Packet Loss on Speech Quality: Genetic Programming Bas...
ANNs.pdf
A Software Requirements Specification
NUAV - A Testbed for Development of Autonomous Unmanned Aerial Vehicles
DevOps Demystified
On Research (And Development)
Simulators as Drivers of Cutting Edge Research
The Knock Knock Protocol
File Transfer Through Sockets
Remote Command Execution
Thesis
CMM Level 3 Assessment of Xavor Pakistan
Data Warehousing
Implementation of a Non-Intrusive Speech Quality Assessment Tool on a Mid-Net...
Implementation of a Non-Intrusive Speech Quality Assessment Tool on a Mid-Net...
Real-Time Non-Intrusive Speech Quality Estimation for VoIP
VoIP
ULMAN GUI Specifications
Modeling the Effect of Packet Loss on Speech Quality: Genetic Programming Bas...
ULMAN-GUI
Modeling the Effect of Packet Loss on Speech Quality: Genetic Programming Bas...

Recently uploaded (20)

PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
master seminar digital applications in india
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Cell Types and Its function , kingdom of life
FourierSeries-QuestionsWithAnswers(Part-A).pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Microbial diseases, their pathogenesis and prophylaxis
human mycosis Human fungal infections are called human mycosis..pptx
master seminar digital applications in india
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPH.pptx obstetrics and gynecology in nursing
102 student loan defaulters named and shamed – Is someone you know on the list?
Final Presentation General Medicine 03-08-2024.pptx
Supply Chain Operations Speaking Notes -ICLT Program
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Sports Quiz easy sports quiz sports quiz
Renaissance Architecture: A Journey from Faith to Humanism
O5-L3 Freight Transport Ops (International) V1.pdf

Genetic Algorithms

  • 1. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions GENETIC ALGORITHMS Muhammad Adil Raja Roaming Researchers, Inc. August 12, 2014 Muhammad Adil Raja Genetic Algorithms
  • 2. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions OUTLINE INTRODUCTION BIOLOGICAL INSPIRATION SEARCH SPACES A GENETIC ALGORITHM EXPERIMENTAL SETUP GENETIC OPERATORS APPLICATIONS CONCLUSIONS Muhammad Adil Raja Genetic Algorithms
  • 3. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions OUTLINE INTRODUCTION BIOLOGICAL INSPIRATION SEARCH SPACES A GENETIC ALGORITHM EXPERIMENTAL SETUP GENETIC OPERATORS APPLICATIONS CONCLUSIONS Muhammad Adil Raja Genetic Algorithms
  • 4. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions OUTLINE INTRODUCTION BIOLOGICAL INSPIRATION SEARCH SPACES A GENETIC ALGORITHM EXPERIMENTAL SETUP GENETIC OPERATORS APPLICATIONS CONCLUSIONS Muhammad Adil Raja Genetic Algorithms
  • 5. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions OUTLINE INTRODUCTION BIOLOGICAL INSPIRATION SEARCH SPACES A GENETIC ALGORITHM EXPERIMENTAL SETUP GENETIC OPERATORS APPLICATIONS CONCLUSIONS Muhammad Adil Raja Genetic Algorithms
  • 6. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions OUTLINE INTRODUCTION BIOLOGICAL INSPIRATION SEARCH SPACES A GENETIC ALGORITHM EXPERIMENTAL SETUP GENETIC OPERATORS APPLICATIONS CONCLUSIONS Muhammad Adil Raja Genetic Algorithms
  • 7. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions OUTLINE INTRODUCTION BIOLOGICAL INSPIRATION SEARCH SPACES A GENETIC ALGORITHM EXPERIMENTAL SETUP GENETIC OPERATORS APPLICATIONS CONCLUSIONS Muhammad Adil Raja Genetic Algorithms
  • 8. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions OUTLINE INTRODUCTION BIOLOGICAL INSPIRATION SEARCH SPACES A GENETIC ALGORITHM EXPERIMENTAL SETUP GENETIC OPERATORS APPLICATIONS CONCLUSIONS Muhammad Adil Raja Genetic Algorithms
  • 9. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions OUTLINE INTRODUCTION BIOLOGICAL INSPIRATION SEARCH SPACES A GENETIC ALGORITHM EXPERIMENTAL SETUP GENETIC OPERATORS APPLICATIONS CONCLUSIONS Muhammad Adil Raja Genetic Algorithms
  • 10. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions INTRODUCTION TO GENETIC ALGORITHMS (GAS) Genetic algorithms are inspired by Charles Darwin’s theory of evolution. Fall under the umbrella of evolutionary computing. Idea came from John Holland. Muhammad Adil Raja Genetic Algorithms
  • 11. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions BIOLOGICAL INSPIRATION I The idea is inspired from natural evolutionary biological systems. In natural biological evolutionary systems, organisms are made of cells. A cell is composed of a set of chromosomes. Chromosomes are found in the nucleus. Chromosomes are made of DNA. FIGURE: Structure of a Biological Cell Muhammad Adil Raja Genetic Algorithms
  • 12. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions BIOLOGICAL INSPIRATION II Sections of Chromosomes are called genes. DNA - deoxyribonucleic acid. it is the genetic code that contains all the information needed to build and maintain an organism. FIGURE: Chromosome Structure Muhammad Adil Raja Genetic Algorithms
  • 13. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions BIOLOGICAL INSPIRATION III Each organism has a distinct number of chromosomes. In humans every cell contains 46 chromosomes (23 pairs). Other organisms have different numbers. A dog has 76 chromosomes per cell. Chromosomes come in pairs. These are called homologous pairs (homologs). Homologs can be imagined as matching pairs. But they are not exactly alike. Like a pair of shoes they can be different. Muhammad Adil Raja Genetic Algorithms
  • 14. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions SOME JARGON I Chromosomes are composed of DNA. DNA (and consequently chromosomes) are made of genes. A chromosome contains hundreds of thousands of genes. Trait: Each gene encodes a particular protein, e.g. eye color. Alleles: Possible settings for a trait (e.g. color can be blue, brown or black). Muhammad Adil Raja Genetic Algorithms
  • 15. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions SOME JARGON II Locus: Each gene’s own position in chromosome. Genome: Complete set of genetic material. Genotype: A particular set of genes in a genome. Phenotype: A genotype’s physical and apparent characteristics. (e.g. color, height, intelligence etc.) Muhammad Adil Raja Genetic Algorithms
  • 16. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions REPRODUCTION I Crossover: (recombination): Happens during reproduction. Genes from parents recombine in a meaningful sense to form a whole new chromosome. Offspring. They can be genetically mutated. Muhammad Adil Raja Genetic Algorithms
  • 17. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions REPRODUCTION II Mutation: Elements of the DNA are randomly changed a little bit. This change is mainly caused during reproduction by errors committed during copying genes from parents. Fitness: A measure of success of the organism in a typical ecosystem. Muhammad Adil Raja Genetic Algorithms
  • 18. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions SEARCH SPACES I Space of all feasible solutions. Each point in a search space represents one feasible solution. Each feasible solution can be marked by its value or fitness for a problem. Good solutions are desired. It is often not possible to prove what is an optimum solution. FIGURE: A Non-Linear Search Space Muhammad Adil Raja Genetic Algorithms
  • 19. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions SEARCH SPACES II Search spaces can be very non-linear. Like a mountainous terrain. Finding the optimum solution is the real challenge. Many locally optimum solutions can exist. One or few globally optimum solutions may also exist. How to find the best one? That is what optimization is all about. Muhammad Adil Raja Genetic Algorithms
  • 20. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions A GENETIC ALGORITHM I Solutions to problems are actually evolved. The algorithm starts with a set of randomly chosen solutions. The solutions can be good or really really bad. Solutions are evaluated for their fitness. Muhammad Adil Raja Genetic Algorithms
  • 21. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions A GENETIC ALGORITHM II Solutions from one population are taken and used to form a new population of better solutions. Solutions that are selected to form new offspring solutions are selected according to their fitness. The more suitable ones have more chances to reproduce. The algorithm is repeated until some stopping criterion is met. Muhammad Adil Raja Genetic Algorithms
  • 22. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions A GA LIFE CYCLE: THE PSEUDOCODE A GA Life Cycle: The Pseudo Code 1. Create an initial population of candidate solutions to a given problem. 2. Evaluation. 3. Selection. 4. Reproduction. 5. Evaluation. 6. Replacement. 7. Continue from 3. Muhammad Adil Raja Genetic Algorithms
  • 23. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions A TYPICAL GA BREEDING CYCLE Muhammad Adil Raja Genetic Algorithms
  • 24. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions TABLE: Fiddle Parameters of a Typical GA Experiment Parameter Value Initial Population Size 300 Initial Tree Depth 6 Selection Tournament Selection & Roulette Wheel Tournament Size 2 Genetic Operators Crossover and Mutation Operators Probability Type Adaptive Initial Operator probabilities 0.5 each Survival Elitism and Generational Generation Gap 1 Muhammad Adil Raja Genetic Algorithms
  • 25. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions SELECTION Roulette Wheel Selection – Fitness Proportionate Selection. Tournament Selection. Muhammad Adil Raja Genetic Algorithms
  • 26. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions SOLUTION REPRESENTATION IN GAS I Depending upon the problem and its formulation, a solution can be represented in various ways in a GA. Most notable representations are: 1. Binary string representation. This is one of the most common way of representing a solution in a GA. The solution is represented as a string of binary numbers. Akin to a chromosome in biology. 2. Integer-valued arrays – Integer programming (?). 3. Real-valued arrays – for continuous parameter optimization. 4. Complete computer programs – as in GP. Muhammad Adil Raja Genetic Algorithms
  • 27. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions SOLUTION REPRESENTATION IN GAS II TABLE: Binary String Representation Chromosome 1 1101100100110110 Chromosome 2 1101111000011110 Muhammad Adil Raja Genetic Algorithms
  • 28. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions CROSSOVER I 1. Randomly choose two individuals (chromosomes/individuals). 2. Choose crossover points on each one of them. 3. Swap the sub-parts around crossover points to form new offspring. Respect Syntactic or semantic constraints. The child should solve the problem somehow. Muhammad Adil Raja Genetic Algorithms
  • 29. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions CROSSOVER II TABLE: Binary String Crossover Chromosome 1 110110010 0110110 Chromosome 2 110111100 0011110 Child Chromosome 1 110110010 110111100 Child Chromosome 2 0110110 0011110 Muhammad Adil Raja Genetic Algorithms
  • 30. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions MUTATION I 1. Choose a newly created offspring. 2. Pick a random gene, or a few genes, on it. 3. Change its value to something else randomly – Change allele. Muhammad Adil Raja Genetic Algorithms
  • 31. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions MUTATION II TABLE: Binary String Mutation Chromosome 1 1101100100110110 Chromosome 2 1101111010011110 Muhammad Adil Raja Genetic Algorithms
  • 32. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions SURVIVAL Elitism Replacement Muhammad Adil Raja Genetic Algorithms
  • 33. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions FITNESS EVALUATION Mean squared error (MSE). Chi squared error. Scaled mean squared error. Muhammad Adil Raja Genetic Algorithms
  • 34. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions APPLICATIONS OF GAS I Applications are quite too many. GA as a hammer. A hammer that finds almost everything else as a nail. Muhammad Adil Raja Genetic Algorithms
  • 35. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions APPLICATIONS OF GAS II In regression and classification. Regression or Classification of nonlinear problems. In Telecommunications: Speech quality estimation. In Computer Networks: Network coding. In Finance: In evolving effective bidding strategies. In Clinical: Cancer detectors, seizure detectors, mental health diagnosis etc. Muhammad Adil Raja Genetic Algorithms
  • 36. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions APPLICATIONS OF GAS III In evolving chess players. In evolving antenna designs. Evolvable hardware. Muhammad Adil Raja Genetic Algorithms
  • 37. Introduction Biological Inspiration Search Spaces A Genetic Algorithm Experimental Setup Genetic Operators Applications Conclusions CONCLUSIONS GAs are strong problem solving algorithms. They can be applied to a large number of optimization problems. Alternative solution representations render them suitable for a wide variety of problem domains. They are easy to understand. The analogue from biological evolution is quite helpful. They are easy to implement and fun to use. They can be used to solved difficult problems. Particularly suitable for finding acceptable solutions to otherwise intractable problems. ... Muhammad Adil Raja Genetic Algorithms