SlideShare a Scribd company logo
1 of 12
Genetic Algorithms
BY
RIMPLE DHAMIJA
Genetic Algorithms
•Genetic Algorithms are part of evolutionary computing.
•Genetic Algorithm (GA) is a search-based optimization technique based on the principles
of Genetics and Natural Selection. It is frequently used to find optimal or near-optimal solutions
to difficult problems which otherwise would take a lifetime to solve.
• Optimization is the process of making something better. In any process, we have a set of inputs
and a set of outputs
•Optimization refers to finding the values of inputs in such a way that we get the “best” output
values.
•The definition of “best” varies from problem to problem, but in mathematical terms, it refers to
maximizing or minimizing one or more objective functions, by varying the input parameters.
Search Space
If We are solving some problem, we are usually looking for solutions best among others.
The space of all feasible solutions is called Search Space( State space).
Each point in the Search space represent one feasible solution. Each feasible solution can be
marked by its value of fitness for the problem.
Various techniques to find suitable solution are Hill Climbing, Best-First Search etc.
The solution is often considered as good solution because it is not possible to prove what is real
optimum.
NP-Hard Problems are kind of difficult problems which cannot be solved by traditional way.
It is difficult to find solution but once we have it, it is easy to check the solution. This fact led to
NP-Complete Problem.
Search Space(contd.)
NP- means Non-Deterministic Polynomial
 It means that it is possible to guess the solution( by some non-deterministic algorithm) and
then check it, both in polynomial time.
 NP-Complete problems are of type for which answer is simply ‘Yes’ or ‘No’.
 The problems with complicated outputs are called NP-Hard problems.
 To find a solution, simply try all the alternatives but this is very slow and sometimes not
usable at all.
 Genetic Algorithms are alternative method to solve NP-Problem. E.g. Travelling Salesman
Problem
Principle behind Genetic Algorithms
•SELECT THE BEST, DISCARD THE REST
•It is based on Darwin’s principle of natural selection.
• If there are Organisms that reproduce, and
• If Offsprings inherit traits from there progenitors, and
• If there is variability of traits, and
• If the environment cannot support all members of a growing population,
• Then those members of the population with less adaptive traits( determined by the
environment) will die out, and
• Those members with more adaptive traits( determined by the environment ) will thrive.
• The Result is evolution of Species.
Evolution through Natural Selection
Initial Population of Animals
Struggle for existence, survival of the fittest
Surviving individuals reproduce, propagate favourable characteristics
Millions of Years
Evolved Species
[Favourable characteristic now a trait of Species.]
Nature to Computer Mapping
NATURE
Population
Individual
Fitness
Chromosome
Gene
Reproduction
COMPUTER
Set Of Solutions
Solution to a Problem
Quality of a Solution
Encoding for a Solution
Part of encoding
Crossover
Requirements to implement Genetic
Algorithm
Two important elements required for any problem before a genetic algorithm can be used for a solution are
•Method for representing a solution ex: a string of bits, numbers, character ex: determination total weight.
•Method for measuring the quality of any proposed solution, using fitness function.
Basi
GA
Genetic Algorithm is started with a set of solutions(represented by Chromosomes) called
population.
Solutions from one Population are taken and used to form a new population.( This is motivated
by hope that the new population will be better than the old one)
Solutions which are selected to form new solutions(Offsprings) are selected according to their
fitness value( the more suitable they are, the more chances they have to reproduce.)
This process is repeated until some condition is satisfied. E.g. No of Populations or improvement
of the best solution.
Genetic Algorithm
Step 1- [START] Generate random population of n Chromosomes i.e. suitable solutions to the
problem.
Step 2- [Fitness] Evaluate the fitness f(x) of each Chromosome x in the Population.
Step 3-[New Population] Create a new population by repeating following steps until the new
population is complete.
◦ (a) [Selection] Select two parent Chromosomes from a Population according to their
fitness.(the better fitness, the bigger chances to be selected)
◦ (b)[Crossover] With a crossover probability, cross over the parents to form a new
offspring(children). If no crossover was performed, offspring is an exact copy of parents.
◦ ( c)[Mutation] With a mutation probability, mutate new offspring at each locus( position in
chromosome)
Genetic Algorithm(contd.)
◦ ( d)[Accepting] Place new offspring in a new Population.
Step 4- [Replace] Use new generated population for a further run of algorithm.
Step 5- [Test] If the end condition is satisfied, Stop, and return the best Solution in current
Population.
Step 6- [Loop] Go To Step 2.
Genetic Algorithm( an alternate)
Simple_Genetic_Algorithm()
{
Initialize the Population;
Calculate Fitness Function;
While( Fitness Value != Optimal Value)
{
◦ Selection; // Natural Selection, Survival of Fittest
◦ Crossover; //Reproduction, Propagate favourable characteristics
◦ Mutation; // Mutation
◦ Calculate Fitness Function;
}
}

More Related Content

Similar to Genetic algorithms

Explanation and example of genetic algorithm
Explanation and example of genetic algorithmExplanation and example of genetic algorithm
Explanation and example of genetic algorithmMarkKhan23
 
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
 
Parallel evolutionary approach paper
Parallel evolutionary approach paperParallel evolutionary approach paper
Parallel evolutionary approach paperPriti Punia
 
Genetic algorithm raktim
Genetic algorithm raktimGenetic algorithm raktim
Genetic algorithm raktimRaktim Halder
 
Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Raktim Halder
 
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
 
Flowchart of ga
Flowchart of gaFlowchart of ga
Flowchart of gaDEEPIKA T
 
generic optimization techniques lecture slides
generic optimization techniques  lecture slidesgeneric optimization techniques  lecture slides
generic optimization techniques lecture slidesSardarHamidullah
 
Genetic Algorithms : A class of Evolutionary Algorithms
Genetic Algorithms : A class of Evolutionary AlgorithmsGenetic Algorithms : A class of Evolutionary Algorithms
Genetic Algorithms : A class of Evolutionary AlgorithmsKavya Barnadhya Hazarika
 
Genetic Algorithm: A Crisp And Concise Introduction [Shakeeb A.]
Genetic Algorithm: A Crisp And Concise Introduction [Shakeeb A.]Genetic Algorithm: A Crisp And Concise Introduction [Shakeeb A.]
Genetic Algorithm: A Crisp And Concise Introduction [Shakeeb A.]Shakeeb Ahmad Mohammad Mukhtar
 
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
 
A Review On Genetic Algorithm And Its Applications
A Review On Genetic Algorithm And Its ApplicationsA Review On Genetic Algorithm And Its Applications
A Review On Genetic Algorithm And Its ApplicationsKaren Gomez
 
GENETIC ALGORITHM
GENETIC ALGORITHMGENETIC ALGORITHM
GENETIC ALGORITHMsowfi
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithmsAmna Saeed
 

Similar to Genetic algorithms (20)

Explanation and example of genetic algorithm
Explanation and example of genetic algorithmExplanation and example of genetic algorithm
Explanation and example of genetic algorithm
 
Introduction to genetic algorithms
Introduction to genetic algorithmsIntroduction to genetic algorithms
Introduction to genetic algorithms
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic Algorithms
 
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
 
Parallel evolutionary approach paper
Parallel evolutionary approach paperParallel evolutionary approach paper
Parallel evolutionary approach paper
 
Genetic algorithm raktim
Genetic algorithm raktimGenetic algorithm raktim
Genetic algorithm raktim
 
Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP
 
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
 
Flowchart of ga
Flowchart of gaFlowchart of ga
Flowchart of ga
 
generic optimization techniques lecture slides
generic optimization techniques  lecture slidesgeneric optimization techniques  lecture slides
generic optimization techniques lecture slides
 
Genetic Algorithms : A class of Evolutionary Algorithms
Genetic Algorithms : A class of Evolutionary AlgorithmsGenetic Algorithms : A class of Evolutionary Algorithms
Genetic Algorithms : A class of Evolutionary Algorithms
 
Genetic Algorithm: A Crisp And Concise Introduction [Shakeeb A.]
Genetic Algorithm: A Crisp And Concise Introduction [Shakeeb A.]Genetic Algorithm: A Crisp And Concise Introduction [Shakeeb A.]
Genetic Algorithm: A Crisp And Concise Introduction [Shakeeb A.]
 
CI_L02_Optimization_ag2_eng.pdf
CI_L02_Optimization_ag2_eng.pdfCI_L02_Optimization_ag2_eng.pdf
CI_L02_Optimization_ag2_eng.pdf
 
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
 
A Review On Genetic Algorithm And Its Applications
A Review On Genetic Algorithm And Its ApplicationsA Review On Genetic Algorithm And Its Applications
A Review On Genetic Algorithm And Its Applications
 
SoftComputing4
SoftComputing4SoftComputing4
SoftComputing4
 
Document1
Document1Document1
Document1
 
GENETIC ALGORITHM
GENETIC ALGORITHMGENETIC ALGORITHM
GENETIC ALGORITHM
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 

Recently uploaded

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Recently uploaded (20)

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

Genetic algorithms

  • 2. Genetic Algorithms •Genetic Algorithms are part of evolutionary computing. •Genetic Algorithm (GA) is a search-based optimization technique based on the principles of Genetics and Natural Selection. It is frequently used to find optimal or near-optimal solutions to difficult problems which otherwise would take a lifetime to solve. • Optimization is the process of making something better. In any process, we have a set of inputs and a set of outputs •Optimization refers to finding the values of inputs in such a way that we get the “best” output values. •The definition of “best” varies from problem to problem, but in mathematical terms, it refers to maximizing or minimizing one or more objective functions, by varying the input parameters.
  • 3. Search Space If We are solving some problem, we are usually looking for solutions best among others. The space of all feasible solutions is called Search Space( State space). Each point in the Search space represent one feasible solution. Each feasible solution can be marked by its value of fitness for the problem. Various techniques to find suitable solution are Hill Climbing, Best-First Search etc. The solution is often considered as good solution because it is not possible to prove what is real optimum. NP-Hard Problems are kind of difficult problems which cannot be solved by traditional way. It is difficult to find solution but once we have it, it is easy to check the solution. This fact led to NP-Complete Problem.
  • 4. Search Space(contd.) NP- means Non-Deterministic Polynomial  It means that it is possible to guess the solution( by some non-deterministic algorithm) and then check it, both in polynomial time.  NP-Complete problems are of type for which answer is simply ‘Yes’ or ‘No’.  The problems with complicated outputs are called NP-Hard problems.  To find a solution, simply try all the alternatives but this is very slow and sometimes not usable at all.  Genetic Algorithms are alternative method to solve NP-Problem. E.g. Travelling Salesman Problem
  • 5. Principle behind Genetic Algorithms •SELECT THE BEST, DISCARD THE REST •It is based on Darwin’s principle of natural selection. • If there are Organisms that reproduce, and • If Offsprings inherit traits from there progenitors, and • If there is variability of traits, and • If the environment cannot support all members of a growing population, • Then those members of the population with less adaptive traits( determined by the environment) will die out, and • Those members with more adaptive traits( determined by the environment ) will thrive. • The Result is evolution of Species.
  • 6. Evolution through Natural Selection Initial Population of Animals Struggle for existence, survival of the fittest Surviving individuals reproduce, propagate favourable characteristics Millions of Years Evolved Species [Favourable characteristic now a trait of Species.]
  • 7. Nature to Computer Mapping NATURE Population Individual Fitness Chromosome Gene Reproduction COMPUTER Set Of Solutions Solution to a Problem Quality of a Solution Encoding for a Solution Part of encoding Crossover
  • 8. Requirements to implement Genetic Algorithm Two important elements required for any problem before a genetic algorithm can be used for a solution are •Method for representing a solution ex: a string of bits, numbers, character ex: determination total weight. •Method for measuring the quality of any proposed solution, using fitness function. Basi
  • 9. GA Genetic Algorithm is started with a set of solutions(represented by Chromosomes) called population. Solutions from one Population are taken and used to form a new population.( This is motivated by hope that the new population will be better than the old one) Solutions which are selected to form new solutions(Offsprings) are selected according to their fitness value( the more suitable they are, the more chances they have to reproduce.) This process is repeated until some condition is satisfied. E.g. No of Populations or improvement of the best solution.
  • 10. Genetic Algorithm Step 1- [START] Generate random population of n Chromosomes i.e. suitable solutions to the problem. Step 2- [Fitness] Evaluate the fitness f(x) of each Chromosome x in the Population. Step 3-[New Population] Create a new population by repeating following steps until the new population is complete. ◦ (a) [Selection] Select two parent Chromosomes from a Population according to their fitness.(the better fitness, the bigger chances to be selected) ◦ (b)[Crossover] With a crossover probability, cross over the parents to form a new offspring(children). If no crossover was performed, offspring is an exact copy of parents. ◦ ( c)[Mutation] With a mutation probability, mutate new offspring at each locus( position in chromosome)
  • 11. Genetic Algorithm(contd.) ◦ ( d)[Accepting] Place new offspring in a new Population. Step 4- [Replace] Use new generated population for a further run of algorithm. Step 5- [Test] If the end condition is satisfied, Stop, and return the best Solution in current Population. Step 6- [Loop] Go To Step 2.
  • 12. Genetic Algorithm( an alternate) Simple_Genetic_Algorithm() { Initialize the Population; Calculate Fitness Function; While( Fitness Value != Optimal Value) { ◦ Selection; // Natural Selection, Survival of Fittest ◦ Crossover; //Reproduction, Propagate favourable characteristics ◦ Mutation; // Mutation ◦ Calculate Fitness Function; } }