SlideShare a Scribd company logo
1 of 32
Binary Genetic Algorithm
1
Power Point Presentation By:
Shubham Kamble(180020105),
Gourav Tailor (180020032),
Himanshu Sharma (160020057)
Department of Chemical Engineering
I.I.T. Bombay
2
Motivation
Genetic Algorithms have the ability to deliver a “good-
enough” solution “fast-enough”.
➢ Traditional calculus based methods work by starting at a random
point and by moving in the direction of the gradient, till we reach
the top of the hill. This technique is efficient and works very well
for single-peaked objective functions. But most real world
situations have complex problems which causes this method to fail.
➢ Even the most powerful computing systems take a very long time
(even years!) to solve some set of problems. In such a scenario,
GA’s prove to be an efficient tool to provide usable near-optimal
solutions in a short amount of time.
3
Genetic Algorithm
Genetic Algorithm (GA) is a search-based
optimization technique based on the principles of
Genetics and Natural Selection. The working
principle of GA’s is very different from that of
most classical optimization techniques.
In Binary Genetic Algorithm each chromosome of a
population is represented by sequences of zeros
and ones, meaning that a gene can have a value of
either zero ‘0’ or one ‘1’.
4
BGA Flowchart
5
Genetic Algorithm working
❖ GA have a population of possible solutions to the
given problem.
❖ These solutions undergo recombination and
mutation, producing new children, and the process
is repeated over various generations.
❖ Each individual (solution) is assigned a fitness
value (based on objective function value) and the
fitter individuals are given a higher chance to
mate and yield more “fitter” individuals.
❖ This is similar to the Darwinian Theory of
“Survival of the Fittest”.
6
Basic Terms
7
Genotype
Genotype is the population in the computation space.
In the computation space, the solutions are
represented in a way which can be easily understood
and manipulated using a computing system.
Binary Representation:
8
1. Population Initialization
Population: Set of chromosomes usually defined as a two
dimensional array of (Population size,
Chromosome size)
Types:
● Random Initialization − Populate the initial population with
completely random solutions.
● Heuristic initialization − Populate the initial population using a
known heuristic for the problem.
In steady state GA, generate one or two off-springs in each
iteration and they replace one or two individuals from the
population.
9
2. Fitness Calculation
Fitness function takes a candidate solution to the problem as
input and produces as output how “fit” or how “good” the solution
is.
In most cases the fitness function and the objective function
are the same as the objective is to either maximize or minimize
the given objective function.
Characteristics:
❏ Should be sufficiently fast to compute.
❏ It must quantitatively measure how fit a given solution is
10
3. Selection
Process of selecting parents which mate and recombine to
create off-springs for the next generation.
Maintaining good diversity in the population is extremely
crucial for the success of a GA. This taking up of the
entire population by one extremely fit solution is known as
premature convergence and is an undesirable condition in a
GA.
11
Selection
1. Fitness Proportionate Selection: Every individual can become a
parent with a probability which is proportional to its fitness.
Therefore, fitter individuals have a higher chance of mating and
propagating their features to the next generation.
Roulette Wheel Selection Stochastic Universal Sampling
12
Selection
2. Tournament Selection: In K-Way tournament selection, we select
K individuals from the population at random and select the best out of
these to become a parent. Repeat same for the next parent.
13
Selection
3. Rank Selection: It also works with negative fitness values
and is mostly used when the individuals in the population
have very close fitness values . Every individual in the
population is ranked according to their fitness. The
selection of the parents depends on the rank of each
individual and not the fitness.The higher ranked individuals
are preferred more than the lower ranked ones.
4.Random Selection:
Randomly select parents from the existing population. There is
no selection pressure towards fitter individuals
14
4. Crossover
Crossover operator is analogous to reproduction and
biological crossover. More than one parent is selected and
one or more off-springs are produced using the genetic
material of the parents.
Crossover Operators:
1. One Point Crossover
2. Multi Point Crossover
3. Uniform Crossover
15
Crossover
1. One Point Crossover
A random crossover point is selected and the tails of its two parents
are swapped to get new off-springs.
1. Multi Point Crossover
Alternating segments are swapped to get new off-springs.
16
Crossover
3. Uniform Crossover
Treating each gene separately, flip a coin for each chromosome
to decide whether or not it’ll be included in the off-spring.
17
5. Mutation
Small random tweak in the chromosome, to get a new solution.
Used to maintain and introduce diversity in the genetic
population and is usually applied with a low probability.
Mutation Operators:
1. Bit Flip Mutation
2. Random Resetting
3. Swap Mutation
4. Scramble Mutation
5. Inversion Mutation
18
Mutation
1. Bit Flip Mutation
Select one or more random bits and flip them. Used for binary
encoded GAs.
1. Random Resetting
A random value from the set of permissible values is assigned to a
randomly chosen gene.
1. Swap Mutation
Select two positions on the chromosome at random, and
interchange the values.
19
Mutation
4. Scramble Mutation
From the entire chromosome, a subset of genes is chosen and their
values are scrambled or shuffled randomly.
5. Inversion Mutation
Select a subset of genes like in scramble mutation, but instead of
shuffling the subset, invert the entire string in the subset.
20
6. Termination Condition
The termination condition of a Genetic Algorithm is important in
determining when a GA run will end. Initially GA progresses very fast
with better solutions coming in every few iterations, but this tends to
saturate in the later stages where the improvements are very small.
So, want a termination condition such that solution is close to the
optimal, at the end of the run.
Keep one of the following Termination conditions:
1. There is no improvement in the population for X iterations.
2. Reached an absolute number of generations.
3. Objective function value has reached a certain pre-defined value.
21
Applications of BGA
➢ Travelling Salesman Problem: Main motive of this problem is to
find an optimal way to be covered by the salesman, in a given map
with the routes and distance between two points.
➢ Vehicle Routing Problem: Motive is to find an optimal weight of
goods to be delivered or find an optimal set of delivery routes
when other things like distance, weights, depot points are
constrained or have any kind of restrictions.
➢ Financial Markets: GA can solve a variety of issues because
genetic optimization helps in finding an optimal set or combination
of parameters that can affect the market rules and trades.
22
Applications of BGA
➢ Knapsack Problem: Given a set of items, each with a weight and a
value, determine the number of each item to include in a collection
so that the total weight is less than or equal to a given limit.
➢ Data Clustering: Data clustering is an unsupervised learning
process. Major part of this is to find out the centre point of the
clusters and we know that genetic algorithms have great capability
of searching for an optimal value.
23
Literature Survey
Other Evolutionary algorithms-based algorithms:
● Particle swarm optimization (PSO) - a stochastic optimization
technique based on the movement and intelligence of swarms
it also uses population-based approach, PSO algorithm has ease
of implementation and also has high calculation accuracy
● Ant Colony Optimization (ACO) - is a metaheuristic inspired
by the foraging behavior of ant colonies
Properties-
Population of ants (same as GA)
Length of ants junction (same as GA)
Pheromone coefficient, β
Heuristic coefficient, α
Evaporation rate, ρ
Convergence condition Max-min of pop≤0.001
(same as GA)
Maximum Iteration (same as GA)
24
● Artificial Bee Colony (ABC) - simulates the intelligent foraging
behavior of honey bees. Ease of hybridization with other
optimization algorithms
general scheme
➔ Initialization Phase
➔ REPEAT
➔ Employed Bees Phase
➔ Onlooker Bees Phase
➔ Scout Bees Phase
➔ Memorize the best solution achieved so far
➔ UNTIL(Cycle=Maximum Cycle Number or a Maximum CPU time)
● Bacteriologic algorithms (BA) - based on the foraging behavior
of E. coli bacteria
Literature Survey
25
Simple Problem
Applied Binary Genetic Algorithm on simple
problem of function Minimization
min 6x3 + 9y2 + 90z - 30
x,y,z
26
Implementation
27
Implementation
28
Link to python Code
https://drive.google.com/drive/folders/1ggNEO
om3J552NPAG9BGSkP0BLuuOC41Z?usp=sharing
29
Conclusion
Running above code we get the following result
30
Remarks and Comments
Implemented this algorithm in Google Colab in
python
Required Computation Time : 0.7235 sec
Compared with Gradient Descent algorithm for
3rd order single variable function took 0.9 sec
31
Advantages and Limitations
Advantages:
❏ Does not require any derivative information
❏ Always gets an answer to the problem, which gets better over the
time.
❏ Is faster and more efficient as compared to the traditional
methods.
Limitations
❏ Fitness value is calculated repeatedly which might be computationally
expensive for some problems
❏ If not implemented properly, the GA may not converge to the optimal
solution.
32

More Related Content

Similar to BGA.pptx

Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.pptssuser2e437f
 
Genetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.pptGenetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.pptFitnessfreaksfam
 
An efficient and powerful advanced algorithm for solving real coded numerica...
An efficient and powerful advanced algorithm for solving real  coded numerica...An efficient and powerful advanced algorithm for solving real  coded numerica...
An efficient and powerful advanced algorithm for solving real coded numerica...IOSR Journals
 
4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.ppt4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.pptRamjiChaurasiya
 
Parallel evolutionary approach paper
Parallel evolutionary approach paperParallel evolutionary approach paper
Parallel evolutionary approach paperPriti Punia
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithmRespa Peter
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4Nandhini S
 
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning SystemAnalysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning SystemHarshal Jain
 
Clustering using GA and Hill-climbing
Clustering using GA and Hill-climbingClustering using GA and Hill-climbing
Clustering using GA and Hill-climbingFatemeh Karimi
 
UNIT-5 Optimization (Part-1).ppt
UNIT-5 Optimization (Part-1).pptUNIT-5 Optimization (Part-1).ppt
UNIT-5 Optimization (Part-1).pptTvVignesh3
 
Genetic algorithm ppt
Genetic algorithm pptGenetic algorithm ppt
Genetic algorithm pptMayank Jain
 
Particle swarm optimization (PSO) ppt presentation
Particle swarm optimization (PSO) ppt presentationParticle swarm optimization (PSO) ppt presentation
Particle swarm optimization (PSO) ppt presentationLatestShorts
 
Genetic algorithm fitness function
Genetic algorithm fitness functionGenetic algorithm fitness function
Genetic algorithm fitness functionProf Ansari
 
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
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceSahil Kumar
 

Similar to BGA.pptx (20)

Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
 
Genetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.pptGenetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.ppt
 
An efficient and powerful advanced algorithm for solving real coded numerica...
An efficient and powerful advanced algorithm for solving real  coded numerica...An efficient and powerful advanced algorithm for solving real  coded numerica...
An efficient and powerful advanced algorithm for solving real coded numerica...
 
Genetic algorithms mahyar
Genetic algorithms   mahyarGenetic algorithms   mahyar
Genetic algorithms mahyar
 
RM 701 Genetic Algorithm and Fuzzy Logic lecture
RM 701 Genetic Algorithm and Fuzzy Logic lectureRM 701 Genetic Algorithm and Fuzzy Logic lecture
RM 701 Genetic Algorithm and Fuzzy Logic lecture
 
4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.ppt4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.ppt
 
Parallel evolutionary approach paper
Parallel evolutionary approach paperParallel evolutionary approach paper
Parallel evolutionary approach paper
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4
 
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning SystemAnalysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
 
[IJCT-V3I2P31] Authors: Amarbir Singh
[IJCT-V3I2P31] Authors: Amarbir Singh[IJCT-V3I2P31] Authors: Amarbir Singh
[IJCT-V3I2P31] Authors: Amarbir Singh
 
Clustering using GA and Hill-climbing
Clustering using GA and Hill-climbingClustering using GA and Hill-climbing
Clustering using GA and Hill-climbing
 
1582997627872.pdf
1582997627872.pdf1582997627872.pdf
1582997627872.pdf
 
UNIT-5 Optimization (Part-1).ppt
UNIT-5 Optimization (Part-1).pptUNIT-5 Optimization (Part-1).ppt
UNIT-5 Optimization (Part-1).ppt
 
Document1
Document1Document1
Document1
 
Genetic algorithm ppt
Genetic algorithm pptGenetic algorithm ppt
Genetic algorithm ppt
 
Particle swarm optimization (PSO) ppt presentation
Particle swarm optimization (PSO) ppt presentationParticle swarm optimization (PSO) ppt presentation
Particle swarm optimization (PSO) ppt presentation
 
Genetic algorithm fitness function
Genetic algorithm fitness functionGenetic algorithm fitness function
Genetic algorithm fitness function
 
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
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial Intelligence
 

Recently uploaded

chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 

Recently uploaded (20)

chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 

BGA.pptx

  • 1. Binary Genetic Algorithm 1 Power Point Presentation By: Shubham Kamble(180020105), Gourav Tailor (180020032), Himanshu Sharma (160020057) Department of Chemical Engineering I.I.T. Bombay
  • 2. 2 Motivation Genetic Algorithms have the ability to deliver a “good- enough” solution “fast-enough”. ➢ Traditional calculus based methods work by starting at a random point and by moving in the direction of the gradient, till we reach the top of the hill. This technique is efficient and works very well for single-peaked objective functions. But most real world situations have complex problems which causes this method to fail. ➢ Even the most powerful computing systems take a very long time (even years!) to solve some set of problems. In such a scenario, GA’s prove to be an efficient tool to provide usable near-optimal solutions in a short amount of time.
  • 3. 3 Genetic Algorithm Genetic Algorithm (GA) is a search-based optimization technique based on the principles of Genetics and Natural Selection. The working principle of GA’s is very different from that of most classical optimization techniques. In Binary Genetic Algorithm each chromosome of a population is represented by sequences of zeros and ones, meaning that a gene can have a value of either zero ‘0’ or one ‘1’.
  • 5. 5 Genetic Algorithm working ❖ GA have a population of possible solutions to the given problem. ❖ These solutions undergo recombination and mutation, producing new children, and the process is repeated over various generations. ❖ Each individual (solution) is assigned a fitness value (based on objective function value) and the fitter individuals are given a higher chance to mate and yield more “fitter” individuals. ❖ This is similar to the Darwinian Theory of “Survival of the Fittest”.
  • 7. 7 Genotype Genotype is the population in the computation space. In the computation space, the solutions are represented in a way which can be easily understood and manipulated using a computing system. Binary Representation:
  • 8. 8 1. Population Initialization Population: Set of chromosomes usually defined as a two dimensional array of (Population size, Chromosome size) Types: ● Random Initialization − Populate the initial population with completely random solutions. ● Heuristic initialization − Populate the initial population using a known heuristic for the problem. In steady state GA, generate one or two off-springs in each iteration and they replace one or two individuals from the population.
  • 9. 9 2. Fitness Calculation Fitness function takes a candidate solution to the problem as input and produces as output how “fit” or how “good” the solution is. In most cases the fitness function and the objective function are the same as the objective is to either maximize or minimize the given objective function. Characteristics: ❏ Should be sufficiently fast to compute. ❏ It must quantitatively measure how fit a given solution is
  • 10. 10 3. Selection Process of selecting parents which mate and recombine to create off-springs for the next generation. Maintaining good diversity in the population is extremely crucial for the success of a GA. This taking up of the entire population by one extremely fit solution is known as premature convergence and is an undesirable condition in a GA.
  • 11. 11 Selection 1. Fitness Proportionate Selection: Every individual can become a parent with a probability which is proportional to its fitness. Therefore, fitter individuals have a higher chance of mating and propagating their features to the next generation. Roulette Wheel Selection Stochastic Universal Sampling
  • 12. 12 Selection 2. Tournament Selection: In K-Way tournament selection, we select K individuals from the population at random and select the best out of these to become a parent. Repeat same for the next parent.
  • 13. 13 Selection 3. Rank Selection: It also works with negative fitness values and is mostly used when the individuals in the population have very close fitness values . Every individual in the population is ranked according to their fitness. The selection of the parents depends on the rank of each individual and not the fitness.The higher ranked individuals are preferred more than the lower ranked ones. 4.Random Selection: Randomly select parents from the existing population. There is no selection pressure towards fitter individuals
  • 14. 14 4. Crossover Crossover operator is analogous to reproduction and biological crossover. More than one parent is selected and one or more off-springs are produced using the genetic material of the parents. Crossover Operators: 1. One Point Crossover 2. Multi Point Crossover 3. Uniform Crossover
  • 15. 15 Crossover 1. One Point Crossover A random crossover point is selected and the tails of its two parents are swapped to get new off-springs. 1. Multi Point Crossover Alternating segments are swapped to get new off-springs.
  • 16. 16 Crossover 3. Uniform Crossover Treating each gene separately, flip a coin for each chromosome to decide whether or not it’ll be included in the off-spring.
  • 17. 17 5. Mutation Small random tweak in the chromosome, to get a new solution. Used to maintain and introduce diversity in the genetic population and is usually applied with a low probability. Mutation Operators: 1. Bit Flip Mutation 2. Random Resetting 3. Swap Mutation 4. Scramble Mutation 5. Inversion Mutation
  • 18. 18 Mutation 1. Bit Flip Mutation Select one or more random bits and flip them. Used for binary encoded GAs. 1. Random Resetting A random value from the set of permissible values is assigned to a randomly chosen gene. 1. Swap Mutation Select two positions on the chromosome at random, and interchange the values.
  • 19. 19 Mutation 4. Scramble Mutation From the entire chromosome, a subset of genes is chosen and their values are scrambled or shuffled randomly. 5. Inversion Mutation Select a subset of genes like in scramble mutation, but instead of shuffling the subset, invert the entire string in the subset.
  • 20. 20 6. Termination Condition The termination condition of a Genetic Algorithm is important in determining when a GA run will end. Initially GA progresses very fast with better solutions coming in every few iterations, but this tends to saturate in the later stages where the improvements are very small. So, want a termination condition such that solution is close to the optimal, at the end of the run. Keep one of the following Termination conditions: 1. There is no improvement in the population for X iterations. 2. Reached an absolute number of generations. 3. Objective function value has reached a certain pre-defined value.
  • 21. 21 Applications of BGA ➢ Travelling Salesman Problem: Main motive of this problem is to find an optimal way to be covered by the salesman, in a given map with the routes and distance between two points. ➢ Vehicle Routing Problem: Motive is to find an optimal weight of goods to be delivered or find an optimal set of delivery routes when other things like distance, weights, depot points are constrained or have any kind of restrictions. ➢ Financial Markets: GA can solve a variety of issues because genetic optimization helps in finding an optimal set or combination of parameters that can affect the market rules and trades.
  • 22. 22 Applications of BGA ➢ Knapsack Problem: Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit. ➢ Data Clustering: Data clustering is an unsupervised learning process. Major part of this is to find out the centre point of the clusters and we know that genetic algorithms have great capability of searching for an optimal value.
  • 23. 23 Literature Survey Other Evolutionary algorithms-based algorithms: ● Particle swarm optimization (PSO) - a stochastic optimization technique based on the movement and intelligence of swarms it also uses population-based approach, PSO algorithm has ease of implementation and also has high calculation accuracy ● Ant Colony Optimization (ACO) - is a metaheuristic inspired by the foraging behavior of ant colonies Properties- Population of ants (same as GA) Length of ants junction (same as GA) Pheromone coefficient, β Heuristic coefficient, α Evaporation rate, ρ Convergence condition Max-min of pop≤0.001 (same as GA) Maximum Iteration (same as GA)
  • 24. 24 ● Artificial Bee Colony (ABC) - simulates the intelligent foraging behavior of honey bees. Ease of hybridization with other optimization algorithms general scheme ➔ Initialization Phase ➔ REPEAT ➔ Employed Bees Phase ➔ Onlooker Bees Phase ➔ Scout Bees Phase ➔ Memorize the best solution achieved so far ➔ UNTIL(Cycle=Maximum Cycle Number or a Maximum CPU time) ● Bacteriologic algorithms (BA) - based on the foraging behavior of E. coli bacteria Literature Survey
  • 25. 25 Simple Problem Applied Binary Genetic Algorithm on simple problem of function Minimization min 6x3 + 9y2 + 90z - 30 x,y,z
  • 28. 28 Link to python Code https://drive.google.com/drive/folders/1ggNEO om3J552NPAG9BGSkP0BLuuOC41Z?usp=sharing
  • 29. 29 Conclusion Running above code we get the following result
  • 30. 30 Remarks and Comments Implemented this algorithm in Google Colab in python Required Computation Time : 0.7235 sec Compared with Gradient Descent algorithm for 3rd order single variable function took 0.9 sec
  • 31. 31 Advantages and Limitations Advantages: ❏ Does not require any derivative information ❏ Always gets an answer to the problem, which gets better over the time. ❏ Is faster and more efficient as compared to the traditional methods. Limitations ❏ Fitness value is calculated repeatedly which might be computationally expensive for some problems ❏ If not implemented properly, the GA may not converge to the optimal solution.
  • 32. 32