SlideShare a Scribd company logo
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

More Related Content

Similar to Genetic Agorithm

Machine Learning - Genetic Algorithm Fundamental
Machine Learning - Genetic Algorithm FundamentalMachine Learning - Genetic Algorithm Fundamental
Machine Learning - Genetic Algorithm Fundamental
Anggi Andriyadi
 
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
Lahiru Dilshan
 
GA.pptx
GA.pptxGA.pptx
Introduction to Genetic algorithm
Introduction to Genetic algorithmIntroduction to Genetic algorithm
Introduction to Genetic algorithm
HEENA GUPTA
 
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
Karen Gomez
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
Megha V
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic Algorithms
Derek Kane
 
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
Association of Scientists, Developers and Faculties
 
Genetic algorithm raktim
Genetic algorithm raktimGenetic algorithm raktim
Genetic algorithm raktim
Raktim Halder
 
Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP
Raktim Halder
 
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
MR. VIKRAM SNEHI
 
Lec 7 genetic algorithms
Lec 7 genetic algorithmsLec 7 genetic algorithms
Lec 7 genetic algorithms
Eyob Sisay
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
SHIMI S L
 
45 genetic-algorithms
45 genetic-algorithms45 genetic-algorithms
45 genetic-algorithms
grskrishna
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
Pratheeban Rajendran
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
Fatemeh Karimi
 
Introduction to Evolutionary Computations. Akira Imada
Introduction to Evolutionary Computations. Akira ImadaIntroduction to Evolutionary Computations. Akira Imada
Introduction to Evolutionary Computations. Akira Imada
Lietuvos kompiuterininkų sąjunga
 
evolutionary algo's.ppt
evolutionary algo's.pptevolutionary algo's.ppt
evolutionary algo's.ppt
SherazAhmed103
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
Syed Muhammad Zeejah Hashmi
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
Jagadish Mohanty
 

Similar to 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
 

More from Iman Ardekani

Introduction to Quantitative Research Methods
Introduction to Quantitative Research MethodsIntroduction to Quantitative Research Methods
Introduction to Quantitative Research Methods
Iman Ardekani
 
Introduction to Research Methods
Introduction to Research Methods Introduction to Research Methods
Introduction to 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
 
Expert Systems
Expert SystemsExpert Systems
Expert Systems
Iman Ardekani
 
ANC Tutorial (2013)
ANC Tutorial (2013)ANC Tutorial (2013)
ANC Tutorial (2013)
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
 

More from 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)
 

Recently uploaded

June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 

Recently uploaded (20)

June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 

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

Editor's Notes

  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