SlideShare une entreprise Scribd logo
1  sur  38
Evolutionary
Algorithms
Dr Iman Ardekani
 Nature, science and engineering
 Optimization problem
 Evolutionary algorithms
 Genetic algorithms
 An example
Content
By Iman Ardekani
 In the procedure of exploring the natural laws in
science for fabricating useful products in
engineering, we often face two problems:
1. Learning Problem
2. Optimization Problem
Nature, Science and Engineering
By Iman Ardekani
 Learning Problem
 Processing and classification of data in order to create
information and knowledge.
Nature, Science and Engineering
Data Information Knowledge
Learning Problem
By Iman Ardekani
 Optimization Problem
 Using data in order to find an optimal solution, e.g. the
best decision or parameters of an optimal controller.
Nature, Science and Engineering
Knowledge Best Solution
Optimization Problem
By Iman Ardekani
 Optimization problem has a long history. When Euclid founded
Geometry (as a knowledge), he tried to solve the first
optimization problems. Examples are:
1. What is the shortest path between two points?
2. How to break a stick to make a rectangle with maximum
area?
Optimization Problem
By Iman Ardekani

Optimization Problem
By Iman Ardekani
 An example for optimization problem (combinatorial):
How to place 8 queens on a chess board so that no queens
attack each other.
 How to differentiate with respect to a Queen ?
Optimization Problem
By Iman Ardekani
 An example for optimization problem (multi-objective):
How to minimize costs and maximize benefits.
 There is no answer here.
Optimization Problem
By Iman Ardekani

Optimization Problem
By Iman Ardekani
 There are many different EA algorithms, the basic
of which can be explained through Genetic
Algorithms.
 They are all random-based solution space
searching meta-heuristic algorithms.
Evolutionary Algorithms
By Iman Ardekani
 Mendel (1822-1884) – Philosopher and scientist
cultivated and tested about 29,000 plants between 1856 and
1863 to verify his laws of heritance. Mendel's work was rejected
at first, and was not widely accepted until after he died.
 Darwin (1809-1882) – Scientist
developed his evolution theory, stating that evolution is the
change in the inherited characteristics of biological populations
over successive generations.
Evolutionary Algorithms
Evolutionary algorithms are based on the basic principles of Mendel’s
foundation of genetics and Darwin’s theory of evolution .
By Iman Ardekani
 John Holland – Professor of psychology and Professor of
electrical engineering at the University of Michigan
The main idea of genetic algorithm is that every individual of a
species can be characterized by its abilities that help it to cope
with its environment in terms of survival and reproduction.
Genetic Algorithm
By Iman Ardekani
 A genetic algorithm is a search heuristic algorithm that mimics
the process of natural evolution. It has 5 phases:
Genetic Algorithm
1. Population
Generation
2. Fitness
Evaluation
4. Crossover
5. Mutation 3. Selection
By Iman Ardekani
Phase 1: Population Generation
 Individuals
1. Individuals = a sample from the solution space (each individual
is a solution)
2. Generation = a group of individuals
Genetic Algorithm
individual 1 individual 2 …. individual N
Population | Popsize = N
By Iman Ardekani
Phase 1: Population Generation
 Population Generation Rules
1. The first generation is produced randomly.
2. Next generations are produced through breeding.
Genetic Algorithm
Generation
1
Generation
2
Generation
3
By Iman Ardekani
Phase 1: Population Generation
 Chromosomes and Fitness
Each individual has two properties:
a) Its location (chromosome composed of genes)
b) Its quality (fitness value)
Genetic Algorithm
individual n
Chromosome
Fitness
By Iman Ardekani
Phase 2: Fitness Evaluation
 Fitness value of an individual is usually the value of the cost-
function (to be optimized) with respect to the locations (genes)
of the individual.
Genetic Algorithm
X1: Gene 1
...
X2: Gene 2
XL: Gene 2
chromosome
F(x1,x2,…,xL) Fitness value
By Iman Ardekani
Phase 3: Selection
 After evaluating the fitness of all individuals, we use a selection
process to generate a mating pool.
 Each individual may be selected several times.
 Even low quality individuals have chance to be selected.
 Individuals in the mating pool are called parents.
Genetic Algorithm
By Iman Ardekani
Phase 3: Selection
 Selection Rule:
1. Higher quality = more chance of being selected into the mating pool
Example:
Genetic Algorithm
Individual Fitness Relative
1 90 45%
2 60 30%
3 20 10%
4 30 15%
Mating pool
individual 1
individual 4
individual 1
individual 2
By Iman Ardekani
Phase 4: Crossover
 Two parents might be selected randomly from the mating pool
to generate two offspring.
Genetic Algorithm
Mating pool
individual 1
individual 4
individual 1
individual 2
Random
selection
individual 1
individual 4
Offspring 1
Offspring 2
Crossover
By Iman Ardekani
Phase 4: Crossover
 Crossover Rule:
1. Genes of each offspring is a certain combination of the genes
of its parents.
Genetic Algorithm
X1: Gene 1
X2: Gene 2
X4: Gene 4
Parent 1
chromosome
X3: Gene 3
Y1: Gene 1
Y2: Gene 2
Parent 2
chromosome
Y4: Gene 4
Y3: Gene 3
Offspring 1
chromosome
X1: Gene 1
X2: Gene 2
Y4: Gene 4
Y3: Gene 3
By Iman Ardekani
 Phase 5: Mutation
 There is a very low chance for (small) changes in the genes of
the offspring; however, it should be considered.
 Mutation = Small changes in the genes of an offspring
Genetic Algorithm
X1: Gene 1
X2: Gene 2
Y4: Gene 4
Offspring 1
chromosome
Y3: Gene 3
X1: Gene 1
X2: Gene 2
Z : Gene 3
By Iman Ardekani
 Phase 5: Mutation
 After considering the chance for mutation, the next generation
will be formed of new offspring.
Genetic Algorithm
Current
Generation
Next
Generation
Fitness
evaluation
Selection
Crossover
Mutation
By Iman Ardekani
 Evolution of a walking creature:
Genetic Algorithm
By Iman Ardekani
 The problem is finding the maximal point of f(x):
f(x)=2+xsin(2x)
where the solution space is given by
-1x 2
Example
-1 -0.5 0 0.5 1 1.5 2
0
1
2
3
4
By Iman Ardekani
 Defining chromosomes and genes
−1𝑥 2
1. We can divide the solution space into 212 sections.
2. In this case, each solution value can be represented by a 12-bit
binary number.
3. This 12-bit representation can be considered as Chromosome
4. Each bit can be considered as a gene.
By Iman Ardekani
 Defining chromosomes and genes
𝑥 𝑚𝑖𝑛 = −1
𝑥 𝑚𝑖𝑛 = 2
𝑥 = 𝑥 𝑚𝑎𝑥 − 𝑥 𝑚𝑖𝑛
𝑖=0
11
𝑎𝑖2𝑖
212
+ 𝑥 𝑚𝑖𝑛
Example: 0.9534 can be represented by
1 0 1 0 0 1 1 0 1 0 1 1
By Iman Ardekani
 Initial population generation
Example
By Iman Ardekani
 Steps to follow:
1. 10 random value for x (individuals) leads to 10 chromosomes.
2. The fitness value of each individual can be found as y=f(x).
3. The relative fitness can be then obtained accordingly.
4. Based on the relative fitness values, a selection wheel can be
created.
5. A mating pool can be created by using the selection wheel.
6. Two individual can be selected from the mating pool as
parents.
Example
By Iman Ardekani
 Steps to follow:
7. A random number is generated. If the random number is
higher than a certain level (crossover probability), the
crossover will happen.
8. Otherwise, two other parents will be selected and step 7 will
be repeated.
Example
1 0 1 0 0 1 1 0 1 0 1 1
0 0 1 0 0 1 0 0 1 0 0 1
Parent 1
Parent 2
By Iman Ardekani
 Steps to follow:
7. A random number is generated. If the random number is
higher than a certain level (crossover probability), the
crossover will happen.
8. Otherwise, two other parents will be selected and step 7 will
be repeated.
Example
1 0 1 0 0 1 1 0 1 0 1 1
0 0 1 0 0 1 0 0 1 0 0 1
Parent 1
Parent 2
By Iman Ardekani
 Steps to follow:
9. Crossover process
Example
1 0 1 0 0 1 1 0 1 0 1 1
0 0 1 0 0 1 0 0 1 0 0 1
Parent 1
Parent 2
1 0 1 0 0 1
1 0 1 0 1 10 0 1 0 0 1
0 0 1 0 0 1Child 1
Child 2
By Iman Ardekani
 Steps to follow:
10. For each gene of each child, a random number will be
generated. If the number is higher than a certain value
(mutation probability – very low) then the value of the gene
will be changed. Otherwise, the gene remains untouched.
Example
1 0 1 0 0 1 0 0 1 0 0 1Child 1
1 0 1 0 0 0 0 0 1 0 0 1Child 1
mutation
By Iman Ardekani
 Steps to follow:
11. The two children (after considering the mutation probability)
will be add to the next generation.
12. Step 7 will be repeated until the size of the new generation
becomes equal to the Popsize.
13. Step 2 will be repeated for the new generation.
Example
By Iman Ardekani
 10th generation
Example
By Iman Ardekani
 50th generation
Example
By Iman Ardekani
Questions?
End
By Iman Ardekani

Contenu connexe

Similaire à Genetic Agorithm

Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP
Raktim Halder
 

Similaire à Genetic Agorithm (20)

Machine Learning - Genetic Algorithm Fundamental
Machine Learning - Genetic Algorithm FundamentalMachine Learning - Genetic Algorithm Fundamental
Machine Learning - Genetic Algorithm Fundamental
 
Solving non linear programming minimization problem using genetic algorithm
Solving non linear programming minimization problem using genetic algorithmSolving non linear programming minimization problem using genetic algorithm
Solving non linear programming minimization problem using genetic algorithm
 
GA.pptx
GA.pptxGA.pptx
GA.pptx
 
Introduction to Genetic algorithm
Introduction to Genetic algorithmIntroduction to Genetic algorithm
Introduction to 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
 
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
 
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
 
NNFL 15- Guru Nanak Dev Engineering College
NNFL   15- Guru Nanak Dev Engineering CollegeNNFL   15- Guru Nanak Dev Engineering College
NNFL 15- Guru Nanak Dev Engineering College
 
Lec 7 genetic algorithms
Lec 7 genetic algorithmsLec 7 genetic algorithms
Lec 7 genetic algorithms
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
45 genetic-algorithms
45 genetic-algorithms45 genetic-algorithms
45 genetic-algorithms
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Introduction to Evolutionary Computations. Akira Imada
Introduction to Evolutionary Computations. Akira ImadaIntroduction to Evolutionary Computations. Akira Imada
Introduction to Evolutionary Computations. Akira Imada
 
evolutionary algo's.ppt
evolutionary algo's.pptevolutionary algo's.ppt
evolutionary algo's.ppt
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 

Plus de Iman Ardekani

Introduction to Quantitative Research Methods
Introduction to Quantitative Research MethodsIntroduction to Quantitative Research Methods
Introduction to Quantitative Research Methods
Iman Ardekani
 
Artificial Neural Network
Artificial Neural Network Artificial Neural Network
Artificial Neural Network
Iman Ardekani
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
Iman Ardekani
 
Remote Active Noise Control
Remote Active Noise Control Remote Active Noise Control
Remote Active Noise Control
Iman Ardekani
 
Adaptive Active Control of Sound in Smart Rooms (2014)
Adaptive Active Control of Sound in Smart Rooms (2014)Adaptive Active Control of Sound in Smart Rooms (2014)
Adaptive Active Control of Sound in Smart Rooms (2014)
Iman Ardekani
 

Plus de Iman Ardekani (8)

Introduction to Quantitative Research Methods
Introduction to Quantitative Research MethodsIntroduction to Quantitative Research Methods
Introduction to Quantitative Research Methods
 
Introduction to Research Methods
Introduction to Research Methods Introduction to Research Methods
Introduction to Research Methods
 
Artificial Neural Network
Artificial Neural Network Artificial Neural Network
Artificial Neural Network
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Expert Systems
Expert SystemsExpert Systems
Expert Systems
 
ANC Tutorial (2013)
ANC Tutorial (2013)ANC Tutorial (2013)
ANC Tutorial (2013)
 
Remote Active Noise Control
Remote Active Noise Control Remote Active Noise Control
Remote Active Noise Control
 
Adaptive Active Control of Sound in Smart Rooms (2014)
Adaptive Active Control of Sound in Smart Rooms (2014)Adaptive Active Control of Sound in Smart Rooms (2014)
Adaptive Active Control of Sound in Smart Rooms (2014)
 

Dernier

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Dernier (20)

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 

Genetic Agorithm

  • 2.  Nature, science and engineering  Optimization problem  Evolutionary algorithms  Genetic algorithms  An example Content By Iman Ardekani
  • 3.  In the procedure of exploring the natural laws in science for fabricating useful products in engineering, we often face two problems: 1. Learning Problem 2. Optimization Problem Nature, Science and Engineering By Iman Ardekani
  • 4.  Learning Problem  Processing and classification of data in order to create information and knowledge. Nature, Science and Engineering Data Information Knowledge Learning Problem By Iman Ardekani
  • 5.  Optimization Problem  Using data in order to find an optimal solution, e.g. the best decision or parameters of an optimal controller. Nature, Science and Engineering Knowledge Best Solution Optimization Problem By Iman Ardekani
  • 6.  Optimization problem has a long history. When Euclid founded Geometry (as a knowledge), he tried to solve the first optimization problems. Examples are: 1. What is the shortest path between two points? 2. How to break a stick to make a rectangle with maximum area? Optimization Problem By Iman Ardekani
  • 8.  An example for optimization problem (combinatorial): How to place 8 queens on a chess board so that no queens attack each other.  How to differentiate with respect to a Queen ? Optimization Problem By Iman Ardekani
  • 9.  An example for optimization problem (multi-objective): How to minimize costs and maximize benefits.  There is no answer here. Optimization Problem By Iman Ardekani
  • 11.  There are many different EA algorithms, the basic of which can be explained through Genetic Algorithms.  They are all random-based solution space searching meta-heuristic algorithms. Evolutionary Algorithms By Iman Ardekani
  • 12.  Mendel (1822-1884) – Philosopher and scientist cultivated and tested about 29,000 plants between 1856 and 1863 to verify his laws of heritance. Mendel's work was rejected at first, and was not widely accepted until after he died.  Darwin (1809-1882) – Scientist developed his evolution theory, stating that evolution is the change in the inherited characteristics of biological populations over successive generations. Evolutionary Algorithms Evolutionary algorithms are based on the basic principles of Mendel’s foundation of genetics and Darwin’s theory of evolution . By Iman Ardekani
  • 13.  John Holland – Professor of psychology and Professor of electrical engineering at the University of Michigan The main idea of genetic algorithm is that every individual of a species can be characterized by its abilities that help it to cope with its environment in terms of survival and reproduction. Genetic Algorithm By Iman Ardekani
  • 14.  A genetic algorithm is a search heuristic algorithm that mimics the process of natural evolution. It has 5 phases: Genetic Algorithm 1. Population Generation 2. Fitness Evaluation 4. Crossover 5. Mutation 3. Selection By Iman Ardekani
  • 15. Phase 1: Population Generation  Individuals 1. Individuals = a sample from the solution space (each individual is a solution) 2. Generation = a group of individuals Genetic Algorithm individual 1 individual 2 …. individual N Population | Popsize = N By Iman Ardekani
  • 16. Phase 1: Population Generation  Population Generation Rules 1. The first generation is produced randomly. 2. Next generations are produced through breeding. Genetic Algorithm Generation 1 Generation 2 Generation 3 By Iman Ardekani
  • 17. Phase 1: Population Generation  Chromosomes and Fitness Each individual has two properties: a) Its location (chromosome composed of genes) b) Its quality (fitness value) Genetic Algorithm individual n Chromosome Fitness By Iman Ardekani
  • 18. Phase 2: Fitness Evaluation  Fitness value of an individual is usually the value of the cost- function (to be optimized) with respect to the locations (genes) of the individual. Genetic Algorithm X1: Gene 1 ... X2: Gene 2 XL: Gene 2 chromosome F(x1,x2,…,xL) Fitness value By Iman Ardekani
  • 19. Phase 3: Selection  After evaluating the fitness of all individuals, we use a selection process to generate a mating pool.  Each individual may be selected several times.  Even low quality individuals have chance to be selected.  Individuals in the mating pool are called parents. Genetic Algorithm By Iman Ardekani
  • 20. Phase 3: Selection  Selection Rule: 1. Higher quality = more chance of being selected into the mating pool Example: Genetic Algorithm Individual Fitness Relative 1 90 45% 2 60 30% 3 20 10% 4 30 15% Mating pool individual 1 individual 4 individual 1 individual 2 By Iman Ardekani
  • 21. Phase 4: Crossover  Two parents might be selected randomly from the mating pool to generate two offspring. Genetic Algorithm Mating pool individual 1 individual 4 individual 1 individual 2 Random selection individual 1 individual 4 Offspring 1 Offspring 2 Crossover By Iman Ardekani
  • 22. Phase 4: Crossover  Crossover Rule: 1. Genes of each offspring is a certain combination of the genes of its parents. Genetic Algorithm X1: Gene 1 X2: Gene 2 X4: Gene 4 Parent 1 chromosome X3: Gene 3 Y1: Gene 1 Y2: Gene 2 Parent 2 chromosome Y4: Gene 4 Y3: Gene 3 Offspring 1 chromosome X1: Gene 1 X2: Gene 2 Y4: Gene 4 Y3: Gene 3 By Iman Ardekani
  • 23.  Phase 5: Mutation  There is a very low chance for (small) changes in the genes of the offspring; however, it should be considered.  Mutation = Small changes in the genes of an offspring Genetic Algorithm X1: Gene 1 X2: Gene 2 Y4: Gene 4 Offspring 1 chromosome Y3: Gene 3 X1: Gene 1 X2: Gene 2 Z : Gene 3 By Iman Ardekani
  • 24.  Phase 5: Mutation  After considering the chance for mutation, the next generation will be formed of new offspring. Genetic Algorithm Current Generation Next Generation Fitness evaluation Selection Crossover Mutation By Iman Ardekani
  • 25.  Evolution of a walking creature: Genetic Algorithm By Iman Ardekani
  • 26.  The problem is finding the maximal point of f(x): f(x)=2+xsin(2x) where the solution space is given by -1x 2 Example -1 -0.5 0 0.5 1 1.5 2 0 1 2 3 4 By Iman Ardekani
  • 27.  Defining chromosomes and genes −1𝑥 2 1. We can divide the solution space into 212 sections. 2. In this case, each solution value can be represented by a 12-bit binary number. 3. This 12-bit representation can be considered as Chromosome 4. Each bit can be considered as a gene. By Iman Ardekani
  • 28.  Defining chromosomes and genes 𝑥 𝑚𝑖𝑛 = −1 𝑥 𝑚𝑖𝑛 = 2 𝑥 = 𝑥 𝑚𝑎𝑥 − 𝑥 𝑚𝑖𝑛 𝑖=0 11 𝑎𝑖2𝑖 212 + 𝑥 𝑚𝑖𝑛 Example: 0.9534 can be represented by 1 0 1 0 0 1 1 0 1 0 1 1 By Iman Ardekani
  • 29.  Initial population generation Example By Iman Ardekani
  • 30.  Steps to follow: 1. 10 random value for x (individuals) leads to 10 chromosomes. 2. The fitness value of each individual can be found as y=f(x). 3. The relative fitness can be then obtained accordingly. 4. Based on the relative fitness values, a selection wheel can be created. 5. A mating pool can be created by using the selection wheel. 6. Two individual can be selected from the mating pool as parents. Example By Iman Ardekani
  • 31.  Steps to follow: 7. A random number is generated. If the random number is higher than a certain level (crossover probability), the crossover will happen. 8. Otherwise, two other parents will be selected and step 7 will be repeated. Example 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0 1 Parent 1 Parent 2 By Iman Ardekani
  • 32.  Steps to follow: 7. A random number is generated. If the random number is higher than a certain level (crossover probability), the crossover will happen. 8. Otherwise, two other parents will be selected and step 7 will be repeated. Example 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0 1 Parent 1 Parent 2 By Iman Ardekani
  • 33.  Steps to follow: 9. Crossover process Example 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0 1 Parent 1 Parent 2 1 0 1 0 0 1 1 0 1 0 1 10 0 1 0 0 1 0 0 1 0 0 1Child 1 Child 2 By Iman Ardekani
  • 34.  Steps to follow: 10. For each gene of each child, a random number will be generated. If the number is higher than a certain value (mutation probability – very low) then the value of the gene will be changed. Otherwise, the gene remains untouched. Example 1 0 1 0 0 1 0 0 1 0 0 1Child 1 1 0 1 0 0 0 0 0 1 0 0 1Child 1 mutation By Iman Ardekani
  • 35.  Steps to follow: 11. The two children (after considering the mutation probability) will be add to the next generation. 12. Step 7 will be repeated until the size of the new generation becomes equal to the Popsize. 13. Step 2 will be repeated for the new generation. Example By Iman Ardekani

Notes de l'éditeur

  1. I think there are some drawbacks for evolutionay algorithm. For example, they can find an optimum solution but the process of obtaining this solution is not optimum. Many people think that evolutionary algorithms work in the way that the evolution works in the nature. So study of these algorithms might be interesting. Personally, I am not very keen to these algorithms but understanding them could be useful.
  2. For example, data can be daily temperature of a region. The numbers representing daily temperature should be analyzed in order to create graphs for studying the climate of a region. The graphs or information can represent seasonal temperature or annual temperature. After collecting data and producing information for so many years we can analyze the information and create knowledge for forecasting the climate of that particular area.
  3. Forecasting is a kind of optimization problem. Because you are going to use your knowledge for finding the best possible answer. Back to our previous example, after creating the knowledge of climate in a particular region we can move towards forecasting the climate in that area.
  4. These are deterministic optimization problems because the problem is defined a deterministic problem with certain values for parameters. However, an optimization problem can be defined in a problem domain with high level of uncertainty. This means that some parameters can have some stochastic characteristics.
  5. Lets have a look at the optimization problem in view point of classic mathematics. But the question here is “can we deal with all of the optimization problems using this approach?”… and unfortunately, the answer is a No.
  6. Bring examples for population
  7. Bring examples for population
  8. Bring examples for population