SlideShare a Scribd company logo
1 of 23
Genetic Algorithm (GA)
Presented by :
A. SEKHAR REDDY
M.S. (Pharm.) semester-II
Reg.No:20PIM3277
Department of Pharmacoinformatics
NIPER , S.A.S. nagar (Mohali), Punjab,India
"Survival of the fittest" - Darwin
Genetic Algorithm
• In computer science , a genetic algorithm (GA) is a metaheuristic inspired by the
process of natural selection and genetics that belongs to the larger class of
evolutionary algorithms (EA)
• GAs were developed by John Holland
• Genetic algorithms are commonly used to generate high-quality solutions to
optimization and search problems by relying on biologically inspired operators such
as mutation, crossover and selection
• It is frequently used to find optimal or near-optimal solutions to difficult problems
which otherwise would take a lifetime to solve
2
Optimization
• Optimization is the process of making something better. In any process, we have a
set of inputs and a set of outputs as shown in the following figure.
• Optimization refers to finding the values of inputs in such a way that we get the
best output values.
• GA is frequently used to solve optimization problems, in research, and in machine
learning
3
Basic Terminology
• Population − It is a subset of all the possible (encoded) solutions to the given
problem. The population for a GA is analogous to the population for human beings
except that instead of human beings, we have Candidate Solutions representing
human beings
• Chromosomes − A chromosome is one such solution to the given problem
• Gene − A gene is one element position of a chromosome
• Allele − It is the value of a gene takes for a particular chromosome
4
5
6
GENETIC ALOGORITHM TRADITIONAL ALOGORITHM
based on genetics and natural
selection to solve optimization
problems
step by step procedure to solve a
given problem
most advanced not as advanced
used in fields like AI , ML used in fields like programming
and mathematics
based on probabilistic rules based on fully deterministic rules
search on population of points search on single point
Components of GA
A problem definition as input, and
• Encoding principles (gene, chromosome)
• Initialization procedure (creation)
• Selection of parents (reproduction)
• Genetic operators (mutation, recombination)
• Evaluation function (environment)
• Termination condition
7
8
Flow Chart of Genetic Algorithm
9
• GA uses three main types of rules at each step to create the
next generation from the current population
1. Selection
2. Cross Over
3. Mutation
Selection
• Selection is the stage of a genetic algorithm in which individual genomes
are chosen from a population for later breeding (using the crossover
operator)
• we always have to select the best two to generate the next best of all
11
Methods of Selection
11
1. Roulette Wheel Selection : In the roulette wheel selection, the probability of
choosing an individual for breeding of the next generation is proportional to its fitness,
the better the fitness is, the higher chance for that individual to be chosen
2. Rank Selection : Rank Selection also works with negative fitness values and is
mostly used when the individuals in the population have very close fitness values (this
happens usually at the end of the run)
3. Steady State Selection :
• This is not a particular method of selecting parents. Main idea of this
selection is that big part of chromosomes should survive to next generation.
4. Tournament selection :
• It is a method of selecting an individual from a population of individuals in a
genetic algorithm. Tournament selection involves running several
"tournaments" among a few individuals (or "chromosomes") chosen at
random from the population
12
Crossover
• In genetic algorithms and evolutionary computation, crossover, also called
recombination, is a genetic operator used to combine the genetic information of
two parents to generate new offspring
• It is one way to generate new solutions from an existing population
• Newly generated solutions are typically mutated before being added to the
population
13
Types of crossover
14
1. One-point crossover : A point on both parents' chromosomes is picked randomly, and
designated a 'crossover point'. Bits to the right of that point are swapped between the two
parent chromosomes. This results in two offspring, each carrying some genetic
information from both parents
2. Two-point crossover : In two-point crossover, two crossover points are picked
randomly from the parent chromosomes. The bits in between the two points are swapped
between the parent organisms.
3. Multi-point crossover : Two-point crossover strategy can be generalized to multi-
point crossover for any positive integer n , picking n crossover points
4. Uniform crossover : In this each bit is chosen from either parent with equal
probability. Other mixing ratios are sometimes used, resulting in offspring which inherit
more genetic information from one parent than the other
15
Mutation
• Mutation is a genetic operator used to maintain genetic diversity from one generation
of a population of genetic algorithm chromosomes to the next.
• It is analogous to biological mutation. Mutation alters one or more gene values in a
chromosome from its initial state.
• In mutation, the solution may change entirely from the previous solution.
• Hence GA can come to a better solution by using mutation. Mutation occurs during
evolution according to a user-definable mutation probability. This probability should
be set low. If it is set too high, the search will turn into a primitive random search.
16
Types of Mutation
• Bit Flip Mutation : In this bit flip mutation, we select one or more random bits
and flip them. This is used for binary encoded GAs.
• Random Resetting : Random Resetting is an extension of the bit flip for the
integer representation. In this, a random value from the set of permissible values is
assigned to a randomly chosen gene.
17
• Scramble Mutation : It is also popular with permutation representations. In this,
from the entire chromosome, a subset of genes is chosen and their values are
scrambled or shuffled randomly
• Swap Mutation : In this we select two positions on the chromosome at random, and
interchange the values. This is common in permutation based encodings
• Inversion Mutation : In this we select a subset of genes like in scramble mutation,
but instead of shuffling the subset, we merely invert the entire string in the subset
18
Termination
This generational process is repeated until a termination condition has been reached.
Common terminating conditions are:
• A solution is found that satisfies minimum criteria
• Fixed number of generations reached
• The highest ranking solution's fitness is reaching or has reached a plateau such
that successive iterations no longer produce better results
• Manual inspection
• Combinations of the above
19
Advantages of GA
• The concept is easy to understand
• GA search from a population of points , not a single point
• GA supports multi-objective optimization
• GA use probablistic transition rules, not deterministic rules
• GA is easily parallelised
• GA is stochastic
• GA work well on mixed discrete/continuous problem
20
Disadvantages of GA
• GA implementation is still an art
• GA requires less information about the problem , but designing an objective
function and getting the representation and operators right can be difficult
• GA is computationally expensive i.e.time-consuming
• GA is slower than some other methods
21
Genetic Algorithms - Application
• Neural Networks − GAs are also used to train neural networks, particularly recurrent
neural networks
• Parallelization − GAs also have very good parallel capabilities, and prove to be very
effective means in solving certain problems, and also provide a good area for research
• Machine Learning - genetics based machine learning (GBML) is a niche area in
machine learning.
• Traveling salesman problem − GAs have been used to solve the TSP, which is a well-
known combinatorial problem using novel crossover
22
Thank you

More Related Content

What's hot

MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMPuneet Kulyana
 
Flowchart of GA
Flowchart of GAFlowchart of GA
Flowchart of GAIshucs
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithmgarima931
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithmMegha V
 
Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisXin-She Yang
 
Genetic Algorithm in Artificial Intelligence
Genetic Algorithm in Artificial IntelligenceGenetic Algorithm in Artificial Intelligence
Genetic Algorithm in Artificial IntelligenceSinbad Konick
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithmsadil raja
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic AlgorithmsDr. C.V. Suresh Babu
 
Training Neural Networks
Training Neural NetworksTraining Neural Networks
Training Neural NetworksDatabricks
 
Fuzzy Genetic Algorithm
Fuzzy Genetic AlgorithmFuzzy Genetic Algorithm
Fuzzy Genetic AlgorithmPintu Khan
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic AlgorithmSHIMI S L
 
Genetic Algorithm by Example
Genetic Algorithm by ExampleGenetic Algorithm by Example
Genetic Algorithm by ExampleNobal Niraula
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithmsanas_elf
 

What's hot (20)

MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
 
Flowchart of GA
Flowchart of GAFlowchart of GA
Flowchart of GA
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical Analysis
 
Genetic Algorithm in Artificial Intelligence
Genetic Algorithm in Artificial IntelligenceGenetic Algorithm in Artificial Intelligence
Genetic Algorithm in Artificial Intelligence
 
bat algorithm
bat algorithmbat algorithm
bat algorithm
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
Training Neural Networks
Training Neural NetworksTraining Neural Networks
Training Neural Networks
 
Genetic Algorithm
Genetic Algorithm Genetic Algorithm
Genetic Algorithm
 
Fuzzy Genetic Algorithm
Fuzzy Genetic AlgorithmFuzzy Genetic Algorithm
Fuzzy Genetic Algorithm
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic Algorithm by Example
Genetic Algorithm by ExampleGenetic Algorithm by Example
Genetic Algorithm by Example
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 

Similar to Genetic Algorithm Guide for Optimization Problems

Clustering using GA and Hill-climbing
Clustering using GA and Hill-climbingClustering using GA and Hill-climbing
Clustering using GA and Hill-climbingFatemeh Karimi
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4Nandhini S
 
Introduction to genetic algorithms
Introduction to genetic algorithmsIntroduction to genetic algorithms
Introduction to genetic algorithmsshadanalam
 
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data MiningAtul Khanna
 
Evolutionary (deep) neural network
Evolutionary (deep) neural networkEvolutionary (deep) neural network
Evolutionary (deep) neural networkSoo-Yong Shin
 
WIX3001 Lecture 6 Principles of GA.pptx
WIX3001 Lecture 6 Principles of GA.pptxWIX3001 Lecture 6 Principles of GA.pptx
WIX3001 Lecture 6 Principles of GA.pptxKelvinCheah4
 
Flowchart of ga
Flowchart of gaFlowchart of ga
Flowchart of gaDEEPIKA T
 
GA of a Paper 2012.pptx
GA of a Paper 2012.pptxGA of a Paper 2012.pptx
GA of a Paper 2012.pptxwaqasjavaid26
 
Parallel evolutionary approach paper
Parallel evolutionary approach paperParallel evolutionary approach paper
Parallel evolutionary approach paperPriti Punia
 
Ga presentation
Ga presentationGa presentation
Ga presentationziad zohdy
 
Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.pptNipun85
 
AI_PPT_Genetic-Algorithms.ppt
AI_PPT_Genetic-Algorithms.pptAI_PPT_Genetic-Algorithms.ppt
AI_PPT_Genetic-Algorithms.pptHotTea
 
Genetic-Algorithms forv artificial .ppt
Genetic-Algorithms forv artificial  .pptGenetic-Algorithms forv artificial  .ppt
Genetic-Algorithms forv artificial .pptneelamsanjeevkumar
 
Genetic-Algorithms for machine learning and ai.ppt
Genetic-Algorithms for machine learning and ai.pptGenetic-Algorithms for machine learning and ai.ppt
Genetic-Algorithms for machine learning and ai.pptneelamsanjeevkumar
 

Similar to Genetic Algorithm Guide for Optimization Problems (20)

BGA.pptx
BGA.pptxBGA.pptx
BGA.pptx
 
Clustering using GA and Hill-climbing
Clustering using GA and Hill-climbingClustering using GA and Hill-climbing
Clustering using GA and Hill-climbing
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4
 
Introduction to genetic algorithms
Introduction to genetic algorithmsIntroduction to genetic algorithms
Introduction to genetic algorithms
 
Document1
Document1Document1
Document1
 
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data Mining
 
Evolutionary (deep) neural network
Evolutionary (deep) neural networkEvolutionary (deep) neural network
Evolutionary (deep) neural network
 
WIX3001 Lecture 6 Principles of GA.pptx
WIX3001 Lecture 6 Principles of GA.pptxWIX3001 Lecture 6 Principles of GA.pptx
WIX3001 Lecture 6 Principles of GA.pptx
 
Flowchart of ga
Flowchart of gaFlowchart of ga
Flowchart of ga
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
GA of a Paper 2012.pptx
GA of a Paper 2012.pptxGA of a Paper 2012.pptx
GA of a Paper 2012.pptx
 
Genetic algorithms mahyar
Genetic algorithms   mahyarGenetic algorithms   mahyar
Genetic algorithms mahyar
 
Parallel evolutionary approach paper
Parallel evolutionary approach paperParallel evolutionary approach paper
Parallel evolutionary approach paper
 
0101.genetic algorithm
0101.genetic algorithm0101.genetic algorithm
0101.genetic algorithm
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Ga presentation
Ga presentationGa presentation
Ga presentation
 
Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
 
AI_PPT_Genetic-Algorithms.ppt
AI_PPT_Genetic-Algorithms.pptAI_PPT_Genetic-Algorithms.ppt
AI_PPT_Genetic-Algorithms.ppt
 
Genetic-Algorithms forv artificial .ppt
Genetic-Algorithms forv artificial  .pptGenetic-Algorithms forv artificial  .ppt
Genetic-Algorithms forv artificial .ppt
 
Genetic-Algorithms for machine learning and ai.ppt
Genetic-Algorithms for machine learning and ai.pptGenetic-Algorithms for machine learning and ai.ppt
Genetic-Algorithms for machine learning and ai.ppt
 

Recently uploaded

Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAbdelrhman abooda
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxBoston Institute of Analytics
 
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一F La
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queensdataanalyticsqueen03
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 

Recently uploaded (20)

Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
 
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queens
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 

Genetic Algorithm Guide for Optimization Problems

  • 1. Genetic Algorithm (GA) Presented by : A. SEKHAR REDDY M.S. (Pharm.) semester-II Reg.No:20PIM3277 Department of Pharmacoinformatics NIPER , S.A.S. nagar (Mohali), Punjab,India "Survival of the fittest" - Darwin
  • 2. Genetic Algorithm • In computer science , a genetic algorithm (GA) is a metaheuristic inspired by the process of natural selection and genetics that belongs to the larger class of evolutionary algorithms (EA) • GAs were developed by John Holland • Genetic algorithms are commonly used to generate high-quality solutions to optimization and search problems by relying on biologically inspired operators such as mutation, crossover and selection • It is frequently used to find optimal or near-optimal solutions to difficult problems which otherwise would take a lifetime to solve 2
  • 3. Optimization • Optimization is the process of making something better. In any process, we have a set of inputs and a set of outputs as shown in the following figure. • Optimization refers to finding the values of inputs in such a way that we get the best output values. • GA is frequently used to solve optimization problems, in research, and in machine learning 3
  • 4. Basic Terminology • Population − It is a subset of all the possible (encoded) solutions to the given problem. The population for a GA is analogous to the population for human beings except that instead of human beings, we have Candidate Solutions representing human beings • Chromosomes − A chromosome is one such solution to the given problem • Gene − A gene is one element position of a chromosome • Allele − It is the value of a gene takes for a particular chromosome 4
  • 5. 5
  • 6. 6 GENETIC ALOGORITHM TRADITIONAL ALOGORITHM based on genetics and natural selection to solve optimization problems step by step procedure to solve a given problem most advanced not as advanced used in fields like AI , ML used in fields like programming and mathematics based on probabilistic rules based on fully deterministic rules search on population of points search on single point
  • 7. Components of GA A problem definition as input, and • Encoding principles (gene, chromosome) • Initialization procedure (creation) • Selection of parents (reproduction) • Genetic operators (mutation, recombination) • Evaluation function (environment) • Termination condition 7
  • 8. 8 Flow Chart of Genetic Algorithm
  • 9. 9 • GA uses three main types of rules at each step to create the next generation from the current population 1. Selection 2. Cross Over 3. Mutation
  • 10. Selection • Selection is the stage of a genetic algorithm in which individual genomes are chosen from a population for later breeding (using the crossover operator) • we always have to select the best two to generate the next best of all 11
  • 11. Methods of Selection 11 1. Roulette Wheel Selection : In the roulette wheel selection, the probability of choosing an individual for breeding of the next generation is proportional to its fitness, the better the fitness is, the higher chance for that individual to be chosen 2. Rank Selection : Rank Selection also works with negative fitness values and is mostly used when the individuals in the population have very close fitness values (this happens usually at the end of the run)
  • 12. 3. Steady State Selection : • This is not a particular method of selecting parents. Main idea of this selection is that big part of chromosomes should survive to next generation. 4. Tournament selection : • It is a method of selecting an individual from a population of individuals in a genetic algorithm. Tournament selection involves running several "tournaments" among a few individuals (or "chromosomes") chosen at random from the population 12
  • 13. Crossover • In genetic algorithms and evolutionary computation, crossover, also called recombination, is a genetic operator used to combine the genetic information of two parents to generate new offspring • It is one way to generate new solutions from an existing population • Newly generated solutions are typically mutated before being added to the population 13
  • 14. Types of crossover 14 1. One-point crossover : A point on both parents' chromosomes is picked randomly, and designated a 'crossover point'. Bits to the right of that point are swapped between the two parent chromosomes. This results in two offspring, each carrying some genetic information from both parents 2. Two-point crossover : In two-point crossover, two crossover points are picked randomly from the parent chromosomes. The bits in between the two points are swapped between the parent organisms.
  • 15. 3. Multi-point crossover : Two-point crossover strategy can be generalized to multi- point crossover for any positive integer n , picking n crossover points 4. Uniform crossover : In this each bit is chosen from either parent with equal probability. Other mixing ratios are sometimes used, resulting in offspring which inherit more genetic information from one parent than the other 15
  • 16. Mutation • Mutation is a genetic operator used to maintain genetic diversity from one generation of a population of genetic algorithm chromosomes to the next. • It is analogous to biological mutation. Mutation alters one or more gene values in a chromosome from its initial state. • In mutation, the solution may change entirely from the previous solution. • Hence GA can come to a better solution by using mutation. Mutation occurs during evolution according to a user-definable mutation probability. This probability should be set low. If it is set too high, the search will turn into a primitive random search. 16
  • 17. Types of Mutation • Bit Flip Mutation : In this bit flip mutation, we select one or more random bits and flip them. This is used for binary encoded GAs. • Random Resetting : Random Resetting is an extension of the bit flip for the integer representation. In this, a random value from the set of permissible values is assigned to a randomly chosen gene. 17
  • 18. • Scramble Mutation : It is also popular with permutation representations. In this, from the entire chromosome, a subset of genes is chosen and their values are scrambled or shuffled randomly • Swap Mutation : In this we select two positions on the chromosome at random, and interchange the values. This is common in permutation based encodings • Inversion Mutation : In this we select a subset of genes like in scramble mutation, but instead of shuffling the subset, we merely invert the entire string in the subset 18
  • 19. Termination This generational process is repeated until a termination condition has been reached. Common terminating conditions are: • A solution is found that satisfies minimum criteria • Fixed number of generations reached • The highest ranking solution's fitness is reaching or has reached a plateau such that successive iterations no longer produce better results • Manual inspection • Combinations of the above 19
  • 20. Advantages of GA • The concept is easy to understand • GA search from a population of points , not a single point • GA supports multi-objective optimization • GA use probablistic transition rules, not deterministic rules • GA is easily parallelised • GA is stochastic • GA work well on mixed discrete/continuous problem 20
  • 21. Disadvantages of GA • GA implementation is still an art • GA requires less information about the problem , but designing an objective function and getting the representation and operators right can be difficult • GA is computationally expensive i.e.time-consuming • GA is slower than some other methods 21
  • 22. Genetic Algorithms - Application • Neural Networks − GAs are also used to train neural networks, particularly recurrent neural networks • Parallelization − GAs also have very good parallel capabilities, and prove to be very effective means in solving certain problems, and also provide a good area for research • Machine Learning - genetics based machine learning (GBML) is a niche area in machine learning. • Traveling salesman problem − GAs have been used to solve the TSP, which is a well- known combinatorial problem using novel crossover 22