SlideShare a Scribd company logo
2
Most read
5
Most read
16
Most read
GENETIC ALGORITHMSRohith NandakumarS7 CS06348
INTRODUCTIONGenes are the basic “instructions” for building an organismGene represents a specific trait of 		the organism. Ex: Eye colorA gene may have different settingsA chromosome is a sequence of genes
EVOLUTIONOrganisms (animals or plants) produce a number of offspring which are almost, but not entirely, like themselvesVariation may be due to mutation (random changes)Variation may be due to combination of some characteristics from each parentSome of these offspring may survive to produce offspring of their own - some won’tThe “better adapted” offspring are more likely to surviveOver time, later generations become better and better adaptedGenetic algorithms use this same process to “evolve” better programs
GENETIC ALGORITHMSInspired by Darwin's theory about evolutionTheyare a part of evolutionary computing, which is a rapidly growing area of artificial intelligenceIdea of evolutionary computing was introduced in the 1960s by I.RechenbergGenetic Algorithms (GAs) were invented by John HollandIn 1992 John Kozahas used genetic algorithm to evolve programs to perform certain tasks. He called his method "genetic programming" (GP) LISP programs were used, because programs in this language can expressed in the form of a "parse tree", which is the object the GA works on
THE BASIC ALGORITHMSuppose your “organisms” are 32-bit computer wordsYou want a string in which all the bits are onesHere’s how you can do it:Create 100 randomly generated computer wordsRepeatedly do the following:Count the 1 bits in each wordExit if any of the words have all 32 bits set to 1Keep the ten words that have the most 1s (discard the rest)From each word, generate 9 new words as follows:Choose one of the other wordsTake the first half of this word and combine it with the second half of the other wordPick a random bit in the word and toggle (change) itNote that this procedure does not guarantee that the next “generation” will have more 1 bits, but it’s likely
ENCODINGThe chromosome should in some way contain information about solution which it representsThe most used way of encoding is a binary string. The chromosome then could look like this:Each chromosome has one binary stringEach bit in this string can represent some characteristic of the solution. Or the whole string can represent a number.
CROSSOVERCrossover selects genes from parent chromosomes and creates a new offspringA crossover point is chosen at randomEverything before this point, copy from a first parent and then everything after it copy from the second parent.There are other ways how to make crossoverSpecific crossover made for a specific problem can improve performance of the genetic algorithm
MUTATIONMutation prevents the algorithm to be trapped in a local minimaChanges are made in the offspring randomlyThe mutation depends on the encoding as well as the crossover.
SELECTIONChromosomes are selected from the population to be parents to crossoverMain idea: better individuals get higher chance to reproduceChances proportional to fitnessImplementation: Roulette Wheel techniqueAssign to each individual a part of the roulette wheel
Spin the wheel n times to select n individualsAN EXAMPLE:TRAVELLING SALESMAN PROBLEM
INITIAL POPULATION FOR TSP(5,3,4,6,2)(2,4,6,3,5)(4,3,6,5,2)(2,3,4,6,5)(4,3,6,2,5)(3,4,5,2,6)(3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6)(4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4)
SELECT PARENTS(5,3,4,6,2)(2,4,6,3,5)(4,3,6,5,2)(2,3,4,6,5)(4,3,6,2,5)(3,4,5,2,6)(3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6)(4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4)Try to pick the better ones.
CREATE OFFSPRING(5,3,4,6,2)(2,4,6,3,5)(4,3,6,5,2)(2,3,4,6,5)(4,3,6,2,5)(3,4,5,2,6)(3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6)(4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4)(3,4,5,6,2)
CREATE MORE OFFSPRING(5,3,4,6,2)(2,4,6,3,5)(4,3,6,5,2)(2,3,4,6,5)(4,3,6,2,5)(3,4,5,2,6)(3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6)(4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4)(3,4,5,6,2)(5,4,2,6,3)
MUTATE(5,3,4,6,2)(2,4,6,3,5)(4,3,6,5,2)(2,3,4,6,5)(4,3,6,2,5)(3,4,5,2,6)(3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6)(4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4)(3,4,5,6,2)(5,4,2,6,3)
MUTATE(5,3,4,6,2)(2,4,6,3,5)(4,3,6,5,2)(2,3,4,6,5)(2,3,6,4,5)(3,4,5,2,6)(3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6)(4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4)(3,4,5,6,2)(5,4,2,6,3)
ELIMINATE(5,3,4,6,2)(2,4,6,3,5)(4,3,6,5,2)(2,3,4,6,5)(2,3,6,4,5)(3,4,5,2,6)(3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6)(4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4)(3,4,5,6,2)(5,4,2,6,3)Tend to kill off the worst ones.
INTEGRATE(5,4,2,6,3)(5,3,4,6,2)(2,4,6,3,5)(2,3,6,4,5)(3,4,5,2,6)(3,4,5,6,2)(3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6)(4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4)
RESTART(5,3,4,6,2)(2,4,6,3,5)(5,4,2,6,3)(2,3,6,4,5)(3,4,5,2,6)(3,4,5,6,2)(3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6)(4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4)
GENETIC PROGRAMMINGA string of bits could represent a programIf you want a program to do something, you might try to evolve oneAs a concrete example, suppose you want a program to help you choose stocks in the stock marketThere is a huge amount of data, going back many yearsWhat data has the most predictive value?What’s the best way to combine this data?A genetic program is possible in theory, but it might take years to evolve into something useful
APPLICATIONS OF GATravelling Salesman ProblemArtificial Life (A-Life)RoboticsAutomotive DesignEvolvable HardwareComputer GamingOptimizing Chemical Kinetic AnalysisEncryption and Code Breaking
CONCLUSIONGenetic algorithms are -Fun! They are enjoyable to program and to work withMind-bogglingly slow - you don’t want to use them if you have any alternativesGood for a very few types of problemsGenetic algorithms can sometimes come up with a solution when you can see no other way of tackling the problem
Q & A?
THANKYOU…

More Related Content

PPT
Genetic algorithms
PDF
Genetic Algorithms
PPTX
Genetic Algorithm
PPT
Genetic algorithm
PDF
Genetic Algorithms
PPTX
Ga ppt (1)
PPTX
Genetic algorithm
PPTX
Evolutionary Computing
Genetic algorithms
Genetic Algorithms
Genetic Algorithm
Genetic algorithm
Genetic Algorithms
Ga ppt (1)
Genetic algorithm
Evolutionary Computing

What's hot (20)

PPTX
Evolutionary computing - soft computing
PPTX
Genetic Algorithms
PDF
Genetic Algorithms
PPTX
Genetic Algorithm
PPTX
Genetic algorithm
PPTX
MACHINE LEARNING - GENETIC ALGORITHM
PPT
Genetic Algorithms - Artificial Intelligence
PPTX
Genetic algorithm
PPT
Introduction to Genetic algorithms
PPT
PPTX
Genetic Algorithm
PPSX
Genetic_Algorithm_AI(TU)
PPTX
Genetic algorithms in Data Mining
PPT
Genetic algorithm
PPTX
Genetic Algorithm by Example
PPTX
Particle swarm optimization
PPT
Genetic Algorithms
PDF
Neural Networks: Multilayer Perceptron
PPTX
Flowchart of GA
PPTX
Basics of Soft Computing
Evolutionary computing - soft computing
Genetic Algorithms
Genetic Algorithms
Genetic Algorithm
Genetic algorithm
MACHINE LEARNING - GENETIC ALGORITHM
Genetic Algorithms - Artificial Intelligence
Genetic algorithm
Introduction to Genetic algorithms
Genetic Algorithm
Genetic_Algorithm_AI(TU)
Genetic algorithms in Data Mining
Genetic algorithm
Genetic Algorithm by Example
Particle swarm optimization
Genetic Algorithms
Neural Networks: Multilayer Perceptron
Flowchart of GA
Basics of Soft Computing
Ad

Viewers also liked (16)

PPTX
Genetic Algorithm
PDF
A Practical Schema Theorem for Genetic Algorithm Design and Tuning
PPTX
Regression and Classification: An Artificial Neural Network Approach
PPT
Using Genetic algorithm for Network Intrusion Detection
PPTX
Genetic algorithm raktim
PPTX
Genetic Algorithm
PPTX
Fuzzy Genetic Algorithm
PPTX
Lecture 29 genetic algorithm-example
PPTX
genetic algorithm based music recommender system
PDF
Genetic Algorithms Made Easy
PPTX
Introduction to Genetic Algorithms
PPTX
Neural network & its applications
PPTX
Chapter 5 - Fuzzy Logic
PPTX
Artificial neural network
PDF
Data Science - Part XIV - Genetic Algorithms
PPT
Technology powerpoint presentations
Genetic Algorithm
A Practical Schema Theorem for Genetic Algorithm Design and Tuning
Regression and Classification: An Artificial Neural Network Approach
Using Genetic algorithm for Network Intrusion Detection
Genetic algorithm raktim
Genetic Algorithm
Fuzzy Genetic Algorithm
Lecture 29 genetic algorithm-example
genetic algorithm based music recommender system
Genetic Algorithms Made Easy
Introduction to Genetic Algorithms
Neural network & its applications
Chapter 5 - Fuzzy Logic
Artificial neural network
Data Science - Part XIV - Genetic Algorithms
Technology powerpoint presentations
Ad

Similar to Genetic Algorithm (20)

PDF
Soft Computing- Dr. H.s. Hota 28.08.14.pdf
DOC
A genetic algorithm approach to static job shop scheduling
PDF
A Review On Genetic Algorithm And Its Applications
PDF
Practical Genetic Algorithms
PDF
Genetic Algorithm
PDF
Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016
PDF
RM 701 Genetic Algorithm and Fuzzy Logic lecture
PPTX
Genetic algorithm optimization technique.pptx
PDF
Lec 7 genetic algorithms
PDF
PPTX
Genetic algorithm_raktim_IITKGP
PDF
CSA 3702 machine learning module 4
PPTX
Karyotyping activitybiology2014
PDF
Introduction to Genetic Algorithms and Evolutionary Computation
PPT
AI_PPT_Genetic-Algorithms.ppt
PPT
Genetic-Algorithms forv artificial .ppt
PPT
Genetic-Algorithms.ppt
PPT
Genetic-Algorithms.ppt
PPT
Genetic-Algorithms-computersciencepptnew.ppt
PPT
Genetic-Algorithms for machine learning and ai.ppt
Soft Computing- Dr. H.s. Hota 28.08.14.pdf
A genetic algorithm approach to static job shop scheduling
A Review On Genetic Algorithm And Its Applications
Practical Genetic Algorithms
Genetic Algorithm
Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016
RM 701 Genetic Algorithm and Fuzzy Logic lecture
Genetic algorithm optimization technique.pptx
Lec 7 genetic algorithms
Genetic algorithm_raktim_IITKGP
CSA 3702 machine learning module 4
Karyotyping activitybiology2014
Introduction to Genetic Algorithms and Evolutionary Computation
AI_PPT_Genetic-Algorithms.ppt
Genetic-Algorithms forv artificial .ppt
Genetic-Algorithms.ppt
Genetic-Algorithms.ppt
Genetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms for machine learning and ai.ppt

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Machine Learning_overview_presentation.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Approach and Philosophy of On baking technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
Per capita expenditure prediction using model stacking based on satellite ima...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Machine learning based COVID-19 study performance prediction
Machine Learning_overview_presentation.pptx
The AUB Centre for AI in Media Proposal.docx
Approach and Philosophy of On baking technology
Big Data Technologies - Introduction.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
sap open course for s4hana steps from ECC to s4
NewMind AI Weekly Chronicles - August'25-Week II
Chapter 3 Spatial Domain Image Processing.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
The Rise and Fall of 3GPP – Time for a Sabbatical?
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation_ Review paper, used for researhc scholars

Genetic Algorithm