SlideShare a Scribd company logo
1 of 26
GENETIC
ALGORITHM
@Harsh_Sinha
Presented by :
HARSHWARDHAN SINHA
(3rd SEM C.S.E 2017 -21)
SSIPMT RAIPUR
1.
This Presentation
contains only 25 slides
@Harsh_Sinha
We will see
◂ Introduction
◂ Terminology
◂ Flow chart
◂ Advantages, disadvantages
and applications.
◂ Conclude with an example
@Harsh_Sinha
GENETIC ALGORITHM
◂ Optimization Algorithm
◂ Nature inspired approach based on
Darwin’s law of “survival of the fittest” and
bio-inspired operators such as Pairing,
crossover and mutation
◂ Frequently used to find optimal or near-
optimal solutions of difficult problems
4@Harsh_Sinha
GENETIC ALGORITHM
◂ It is not an smart algorithm neither an
intelligence algorithm
Rather it reflects the changes and
response to it very quickly, so it called
Genetic algorithm.
5@Harsh_Sinha
OPTIMIZATION
◂ Optimization is the process of making
something better
◂ Finding the values of inputs in such a way
that we get the “best” output value.
6@Harsh_Sinha
TERMINOLOGY
◂ Population
◂ Chromosomes
◂ Genes
7
1 0 1 1 0 1
Population
Genes
chromosomes
Alleles
@Harsh_Sinha
BRIEF OF TERMINOLOGY
◂ Genes : A gene represents some
data.
◂ Chromosomes : A chromosome
is an array of genes. In some way
it contains information about
solution which it represents thus
it requires encoding
◂ Population: Collection of
chromosomes strings/array.
8
1 0 1 1 0 1
0 0 1 1 1 0
1 1 0 1 0 0
1 0 0 0 0 1
1 1 0 1 1 1
1 0 1 0 1 1
@Harsh_Sinha
FLOW CHART
9@Harsh_Sinha
END
GENETIC OPERATORS
◂ Selection
◂ Crossover
◂ Mutation
10@Harsh_Sinha
SELECTION
Selection individual for creating the next
generation(better generation).
In terms of CS selecting the data so to reach optimal
solution.
Selection is done by applying fitness function.
11@Harsh_Sinha
FITNESS & FITNESS FUNCTION
Fitness: The value assigned to an individual based on how far or
close an individual is from solution; greater the fitness value
better the solution it contains.
Fitness Function: A function that assigns fitness value to the
individual.It is problem specific.
12@Harsh_Sinha
FLOW CHART
13
By applying
fitness
function we
select the
most
promising
element
@Harsh_Sinha
ENDEND
HOW ARE PARENTS SELECTED?
1. Roulette wheel Selection
14
chromosomes Fitness
value
A 9.8
B 7.9
C 2.4
D 4.5
SPIN THE
WHEEL
@Harsh_Sinha
HOW ARE PARENTS SELECTED?
2. Rank Selection
Remove the concept of fitness
value while selecting a parent.
Every individual in the
population is ranked according
to their fitness.
15
chromosomes Fitness
value
Rank
A 9.8 1
B 7.9 2
C 2.4 4
D 4.5 3
@Harsh_Sinha
HOW ARE PARENTS SELECTED?
3. STOCHASTIC UNIVERSAL SAMPLING(SUS): Multiple fixed points,
all the parents are chosen in just one spin of the wheel.
4.TOURNAMENT SELECTION: Select k individuals from the
population at random and select the best out of these to become a
parent, same process is repeated for selecting the next parent.
16@Harsh_Sinha
FLOW CHART
17@Harsh_Sinha
ENDEND
CROSSOVER
Crossover is a genetic operator that combines(mates) two
chromosomes(parents) to produce a new chromosome(offspring).
The crossover operators are of many types:
1. One simple ways is one-point crossover.
2. The others are two-point, uniform, arithmetic and heuristic
crossovers.
They are selected based on the way chromosomes are encoded.
(Encoded because it is computer science and not biology.)
18@Harsh_Sinha
CROSSOVER
ONE-POINT CROSSOVER: A random crossover point is
selected and the tail of its two parents are swapped to get new
offsprings.
19
1 0 1 1 1 0 1 1
1 1 1 0 1 0 0 1
1 0 1 0 1 0 0 1
1 1 1 1 1 0 1 1
Parent Chromosomes Offspring Chromosomes
@Harsh_Sinha
FLOW CHART
20@Harsh_Sinha
ENDEND
MUTATION
◂ Small random tweak in the chromosome, to get a new solution.
Types
1. Bit-flip mutation: Select one or more random bits and flip them.
1. Swap mutation: Select two random bits and swap them.
21
0 1 1 0 1 0 0 1 0 1 0 0 1 1 0 1
1 0 0 1 1 1 0 1 1 1 0 1 1 1 0 0
@Harsh_Sinha
22
Determines which
individual are to be
kicked out and
which are to be
kept in the next
generation.
SURVIVOR SELECTION
@Harsh_Sinha
END
When are Genetic Algorithms Useful?
There are at least three situations where genetic algorithms are useful:
1. The objective function is not smooth (i.e., not differentiable).
2. There are multiple local optima.
3. Useful when the search space is very large and there are a large
number of parameters (the meaning of “large” keeps changing).
4. Provides a list of “good” solutions and not just a single solution
For details about each point refer to: https://www.burns-stat.com/documents/tutorials/an-introduction-to-genetic-
algorithms/
23@Harsh_Sinha
ITS APPLICATION
1. Optimized Telecommunications Routing
2. Trip, Traffic and Shipment Routing
3. Encryption and Code Breaking
4. Evolvable Hardware
5. Joke and Pun Generation
These are few of them.
For more we can refer to : https://www.brainz.org/15-real-world-applications-genetic-algorithms/
24@Harsh_Sinha
Drawbacks
1. Computationally expensive as fitness value is calculated repeatedly
2. Not suited for all problems, especially problems which are
simple and for which derivative information are available
3. GA may not converge to the optimal solutions,if not implemented
properly.
25@Harsh_Sinha
26
Thanks!
@Harsh_Sinha

More Related Content

What's hot

Introduction to Genetic algorithms
Introduction to Genetic algorithmsIntroduction to Genetic algorithms
Introduction to Genetic algorithmsAkhil Kaushik
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithmsanas_elf
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithmgarima931
 
Flowchart of GA
Flowchart of GAFlowchart of GA
Flowchart of GAIshucs
 
Introduction to genetic algorithms
Introduction to genetic algorithmsIntroduction to genetic algorithms
Introduction to genetic algorithmsshadanalam
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsDerek Kane
 
Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Kapil Khatiwada
 
Genetic algorithm ppt
Genetic algorithm pptGenetic algorithm ppt
Genetic algorithm pptMayank Jain
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMPuneet Kulyana
 
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data MiningAtul Khanna
 
Evolutionary-Algorithms.ppt
Evolutionary-Algorithms.pptEvolutionary-Algorithms.ppt
Evolutionary-Algorithms.pptlakshmi.ec
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithmsadil raja
 

What's hot (20)

Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
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
 
Flowchart of GA
Flowchart of GAFlowchart of GA
Flowchart of GA
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Introduction to genetic algorithms
Introduction to genetic algorithmsIntroduction to genetic algorithms
Introduction to genetic algorithms
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
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
 
Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)
 
Genetic algorithm ppt
Genetic algorithm pptGenetic algorithm ppt
Genetic algorithm ppt
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
 
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data Mining
 
Evolutionary-Algorithms.ppt
Evolutionary-Algorithms.pptEvolutionary-Algorithms.ppt
Evolutionary-Algorithms.ppt
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 

Similar to GENETIC ALGORITHM

Parallel evolutionary approach paper
Parallel evolutionary approach paperParallel evolutionary approach paper
Parallel evolutionary approach paperPriti Punia
 
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
 
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
 
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
 
4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.ppt4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.pptRamjiChaurasiya
 
Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016
Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016
Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016Geoff Harcourt
 
Advanced Optimization Techniques
Advanced Optimization TechniquesAdvanced Optimization Techniques
Advanced Optimization TechniquesValerie Felton
 
Genetic Algorithm (1).pdf
Genetic Algorithm (1).pdfGenetic Algorithm (1).pdf
Genetic Algorithm (1).pdfAzmiNizar1
 
Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)Ahmed Gad
 

Similar to GENETIC ALGORITHM (20)

BGA.pptx
BGA.pptxBGA.pptx
BGA.pptx
 
Parallel evolutionary approach paper
Parallel evolutionary approach paperParallel evolutionary approach paper
Parallel evolutionary approach paper
 
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
 
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
 
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
 
4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.ppt4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.ppt
 
Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016
Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016
Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016
 
lec3-Oct2021.pptx
lec3-Oct2021.pptxlec3-Oct2021.pptx
lec3-Oct2021.pptx
 
Document1
Document1Document1
Document1
 
1582997627872.pdf
1582997627872.pdf1582997627872.pdf
1582997627872.pdf
 
Advanced Optimization Techniques
Advanced Optimization TechniquesAdvanced Optimization Techniques
Advanced Optimization Techniques
 
Genetic Algorithm (1).pdf
Genetic Algorithm (1).pdfGenetic Algorithm (1).pdf
Genetic Algorithm (1).pdf
 
D0353027043
D0353027043D0353027043
D0353027043
 
Final ppt
Final pptFinal ppt
Final ppt
 
Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)
 
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
 

Recently uploaded

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 

GENETIC ALGORITHM

  • 1. GENETIC ALGORITHM @Harsh_Sinha Presented by : HARSHWARDHAN SINHA (3rd SEM C.S.E 2017 -21) SSIPMT RAIPUR
  • 2. 1. This Presentation contains only 25 slides @Harsh_Sinha
  • 3. We will see ◂ Introduction ◂ Terminology ◂ Flow chart ◂ Advantages, disadvantages and applications. ◂ Conclude with an example @Harsh_Sinha
  • 4. GENETIC ALGORITHM ◂ Optimization Algorithm ◂ Nature inspired approach based on Darwin’s law of “survival of the fittest” and bio-inspired operators such as Pairing, crossover and mutation ◂ Frequently used to find optimal or near- optimal solutions of difficult problems 4@Harsh_Sinha
  • 5. GENETIC ALGORITHM ◂ It is not an smart algorithm neither an intelligence algorithm Rather it reflects the changes and response to it very quickly, so it called Genetic algorithm. 5@Harsh_Sinha
  • 6. OPTIMIZATION ◂ Optimization is the process of making something better ◂ Finding the values of inputs in such a way that we get the “best” output value. 6@Harsh_Sinha
  • 7. TERMINOLOGY ◂ Population ◂ Chromosomes ◂ Genes 7 1 0 1 1 0 1 Population Genes chromosomes Alleles @Harsh_Sinha
  • 8. BRIEF OF TERMINOLOGY ◂ Genes : A gene represents some data. ◂ Chromosomes : A chromosome is an array of genes. In some way it contains information about solution which it represents thus it requires encoding ◂ Population: Collection of chromosomes strings/array. 8 1 0 1 1 0 1 0 0 1 1 1 0 1 1 0 1 0 0 1 0 0 0 0 1 1 1 0 1 1 1 1 0 1 0 1 1 @Harsh_Sinha
  • 10. GENETIC OPERATORS ◂ Selection ◂ Crossover ◂ Mutation 10@Harsh_Sinha
  • 11. SELECTION Selection individual for creating the next generation(better generation). In terms of CS selecting the data so to reach optimal solution. Selection is done by applying fitness function. 11@Harsh_Sinha
  • 12. FITNESS & FITNESS FUNCTION Fitness: The value assigned to an individual based on how far or close an individual is from solution; greater the fitness value better the solution it contains. Fitness Function: A function that assigns fitness value to the individual.It is problem specific. 12@Harsh_Sinha
  • 13. FLOW CHART 13 By applying fitness function we select the most promising element @Harsh_Sinha ENDEND
  • 14. HOW ARE PARENTS SELECTED? 1. Roulette wheel Selection 14 chromosomes Fitness value A 9.8 B 7.9 C 2.4 D 4.5 SPIN THE WHEEL @Harsh_Sinha
  • 15. HOW ARE PARENTS SELECTED? 2. Rank Selection Remove the concept of fitness value while selecting a parent. Every individual in the population is ranked according to their fitness. 15 chromosomes Fitness value Rank A 9.8 1 B 7.9 2 C 2.4 4 D 4.5 3 @Harsh_Sinha
  • 16. HOW ARE PARENTS SELECTED? 3. STOCHASTIC UNIVERSAL SAMPLING(SUS): Multiple fixed points, all the parents are chosen in just one spin of the wheel. 4.TOURNAMENT SELECTION: Select k individuals from the population at random and select the best out of these to become a parent, same process is repeated for selecting the next parent. 16@Harsh_Sinha
  • 18. CROSSOVER Crossover is a genetic operator that combines(mates) two chromosomes(parents) to produce a new chromosome(offspring). The crossover operators are of many types: 1. One simple ways is one-point crossover. 2. The others are two-point, uniform, arithmetic and heuristic crossovers. They are selected based on the way chromosomes are encoded. (Encoded because it is computer science and not biology.) 18@Harsh_Sinha
  • 19. CROSSOVER ONE-POINT CROSSOVER: A random crossover point is selected and the tail of its two parents are swapped to get new offsprings. 19 1 0 1 1 1 0 1 1 1 1 1 0 1 0 0 1 1 0 1 0 1 0 0 1 1 1 1 1 1 0 1 1 Parent Chromosomes Offspring Chromosomes @Harsh_Sinha
  • 21. MUTATION ◂ Small random tweak in the chromosome, to get a new solution. Types 1. Bit-flip mutation: Select one or more random bits and flip them. 1. Swap mutation: Select two random bits and swap them. 21 0 1 1 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1 0 0 @Harsh_Sinha
  • 22. 22 Determines which individual are to be kicked out and which are to be kept in the next generation. SURVIVOR SELECTION @Harsh_Sinha END
  • 23. When are Genetic Algorithms Useful? There are at least three situations where genetic algorithms are useful: 1. The objective function is not smooth (i.e., not differentiable). 2. There are multiple local optima. 3. Useful when the search space is very large and there are a large number of parameters (the meaning of “large” keeps changing). 4. Provides a list of “good” solutions and not just a single solution For details about each point refer to: https://www.burns-stat.com/documents/tutorials/an-introduction-to-genetic- algorithms/ 23@Harsh_Sinha
  • 24. ITS APPLICATION 1. Optimized Telecommunications Routing 2. Trip, Traffic and Shipment Routing 3. Encryption and Code Breaking 4. Evolvable Hardware 5. Joke and Pun Generation These are few of them. For more we can refer to : https://www.brainz.org/15-real-world-applications-genetic-algorithms/ 24@Harsh_Sinha
  • 25. Drawbacks 1. Computationally expensive as fitness value is calculated repeatedly 2. Not suited for all problems, especially problems which are simple and for which derivative information are available 3. GA may not converge to the optimal solutions,if not implemented properly. 25@Harsh_Sinha