SlideShare une entreprise Scribd logo
1  sur  19
Genetic algorithms (Soft
Computing)
Lecture 1: Genetic Algorithms
Introduction
Dr. Samar Hesham
Department of Computer Science Faculty of Computers and Artificial Intelligence
Cairo University
Egypt
Human Body
Human
Organs
Tissues
Cells
Genome
9/27/2022 2
Genome
9/27/2022 3
Evolution in the real world
• Each cell of a living thing contains chromosomes - strings
ofDNA
• Each chromosome contains a set of genes - blocks of
DNA
• Each gene determines some aspect of the organism (like
eye colour)
• A collection of genes is sometimes called a genotype
• A collection of aspects (like eye colour) is sometimes
called a phenotype
• Reproduction involves recombination of genes from
parents and then small amounts of mutation (errors) in
copying.
• The fitness of an organism is how much it can
reproduce before it dies.
• Evolution based on “survival of the fittest”
Davidhales.name
Motivation
• Suppose you have a problem with
some search space
• You don’t know how to solve it
• What can you do?
• Can you use a computer to somehow
find a solution for you?
• This would be nice! Can it be done?
A dumb solution = Random Search
A “blind generate and test” algorithm:
Repeat
Generate a random possible solution
Test the solution and see how good it
is
Until reaching a solution that is good
enough
Can we use this dumb idea?
• Sometimes - yes:
–if there are only a few possible
solutions
–and you have enough time
–then such a method could be used
• For most problems - no:
–many possible solutions
–with no time to try them all
–so this method can not be used
A “less-dumb” idea (GA)
Generate a set of random solutions
Repeat
Test each solution in the set (rank them)
Remove some bad solutions from set
Duplicate some good solutions
Make small changes to some of them
Until reaching a solution that is good enough
12
Classes of Search Techniques
Search Techniques
Calculus Base
Techniques
Guided random search
techniques
Enumerative
Techniques
BFS
DFS Dynamic
Programming
Tabu Search
Hill Climbing
Simulated
Annealing
Evolutionary
Algorithms
Genetic
Programming
Genetic
Algorithms
Fibonacci Sort
Genetic Algorithms - History
• A class of Evolutionary optimization algorithms
• Inspired from (Biological) Evolution Process
– Uses concepts of “Natural Selection” and “Genetic
Inheritance”
• Can be used to solve a variety of problems that
are not easy to be solved using traditional
techniques
“Genetic Algorithms are good at taking large,
potentially huge search spaces and
navigating them, looking for optimal
combinations of things, solutions you might
not otherwise find in a lifetime.”
- Salvatore Mangano
Computer Design, May 1995
Genetic Algorithms - History
Biological Evolution Process
“Natural Selection” + “Genetic Inheritance”
Principle Of Natural Selection
19
• IF there are organisms that reproduce, and
• IF offsprings inherit traits from their 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
• THEN those members with more-adaptive traits
(determined by the environment) will survive
The result is the evolution of species.
Basic Idea of Principle of Natural Selection
20
“Select The Best, Discard The Rest”
An Example of Natural Selection
21
• Giraffes have long necks.
Giraffes with slightly longer necks could feed on leaves of higher branches
when all lower ones had been eaten off.
 They had a better chance of survival.
 Favorable characteristic propagated through generations of giraffes.
 Now, evolved species has long necks.
NOTE: Longer necks may have been a deviant characteristic (mutation)
initially, but since it was favorable, was propagated over generations. Now
an established trait.
So, some mutations are beneficial.
Natural Selection
22
Initial Population Of Animals
Struggle For Existence-Survival Of the Fittest
Surviving Individuals Reproduce, Propagate Favorable
Characteristics
Millions Of Years
Evolved Species
(Favorable Characteristic Now A Trait Of Species)
CS.Stonybrook.edu
What Are Genetic Algorithms
(GAs)?
24
Genetic Algorithms are search and
optimization techniques based on
Darwin’s Principle of Natural Selection.
Genetic Algorithms implement
optimization strategies by simulating
evolution of species through natural
selection.
Some Definitions
Chromosomes: an individual in the population in GA is composed of an
array of bits (genes) that takes a value for each chromosome represents
a solution to problem under consideration.
Gene: a particular bit in a chromosome that takes a value and model a
specific trait in a solution.
Population: is a constant size number of chromosomes and represents a
pool of feasible solutions.
Genotype: is a genetic structure (bits organization) of an individual
solution.
Phenotype: it’s the actual solution itself.

Contenu connexe

Similaire à CS464-SoftCom-2022-Lec1 GA-Intro .pptx

Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Raktim Halder
 
introduction of genetic algorithm
introduction of genetic algorithmintroduction of genetic algorithm
introduction of genetic algorithmritambharaaatre
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic AlgorithmsAhmed Othman
 
Explanation and example of genetic algorithm
Explanation and example of genetic algorithmExplanation and example of genetic algorithm
Explanation and example of genetic algorithmMarkKhan23
 
GA of a Paper 2012.pptx
GA of a Paper 2012.pptxGA of a Paper 2012.pptx
GA of a Paper 2012.pptxwaqasjavaid26
 
Genetic algorithm fitness function
Genetic algorithm fitness functionGenetic algorithm fitness function
Genetic algorithm fitness functionProf Ansari
 
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-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.pptGenetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.pptFitnessfreaksfam
 
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
Genetic algorithmsGenetic algorithms
Genetic algorithmsAmna Saeed
 
Genetic algorithms full lecture
Genetic algorithms full lectureGenetic algorithms full lecture
Genetic algorithms full lecturesadiacs
 

Similaire à CS464-SoftCom-2022-Lec1 GA-Intro .pptx (20)

Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP
 
introduction of genetic algorithm
introduction of genetic algorithmintroduction of genetic algorithm
introduction of genetic algorithm
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Memetic algorithms
Memetic algorithmsMemetic algorithms
Memetic algorithms
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction 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 algorithm
 
GA of a Paper 2012.pptx
GA of a Paper 2012.pptxGA of a Paper 2012.pptx
GA of a Paper 2012.pptx
 
Genetic algorithm fitness function
Genetic algorithm fitness functionGenetic algorithm fitness function
Genetic algorithm fitness function
 
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-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.pptGenetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.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
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
genetic computing
genetic computinggenetic computing
genetic computing
 
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
 
Genomics and Plant Genomics
Genomics and Plant GenomicsGenomics and Plant Genomics
Genomics and Plant Genomics
 
Genetic algorithms full lecture
Genetic algorithms full lectureGenetic algorithms full lecture
Genetic algorithms full lecture
 
Unit 18a DNA fingerprinting and genetic engineering
Unit 18a DNA fingerprinting and genetic engineeringUnit 18a DNA fingerprinting and genetic engineering
Unit 18a DNA fingerprinting and genetic engineering
 

Dernier

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 

Dernier (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

CS464-SoftCom-2022-Lec1 GA-Intro .pptx

  • 1. Genetic algorithms (Soft Computing) Lecture 1: Genetic Algorithms Introduction Dr. Samar Hesham Department of Computer Science Faculty of Computers and Artificial Intelligence Cairo University Egypt
  • 4. Evolution in the real world • Each cell of a living thing contains chromosomes - strings ofDNA • Each chromosome contains a set of genes - blocks of DNA • Each gene determines some aspect of the organism (like eye colour) • A collection of genes is sometimes called a genotype • A collection of aspects (like eye colour) is sometimes called a phenotype • Reproduction involves recombination of genes from parents and then small amounts of mutation (errors) in copying. • The fitness of an organism is how much it can reproduce before it dies. • Evolution based on “survival of the fittest”
  • 5. Davidhales.name Motivation • Suppose you have a problem with some search space • You don’t know how to solve it • What can you do? • Can you use a computer to somehow find a solution for you? • This would be nice! Can it be done?
  • 6. A dumb solution = Random Search A “blind generate and test” algorithm: Repeat Generate a random possible solution Test the solution and see how good it is Until reaching a solution that is good enough
  • 7. Can we use this dumb idea? • Sometimes - yes: –if there are only a few possible solutions –and you have enough time –then such a method could be used • For most problems - no: –many possible solutions –with no time to try them all –so this method can not be used
  • 8. A “less-dumb” idea (GA) Generate a set of random solutions Repeat Test each solution in the set (rank them) Remove some bad solutions from set Duplicate some good solutions Make small changes to some of them Until reaching a solution that is good enough
  • 9. 12 Classes of Search Techniques Search Techniques Calculus Base Techniques Guided random search techniques Enumerative Techniques BFS DFS Dynamic Programming Tabu Search Hill Climbing Simulated Annealing Evolutionary Algorithms Genetic Programming Genetic Algorithms Fibonacci Sort
  • 10. Genetic Algorithms - History • A class of Evolutionary optimization algorithms • Inspired from (Biological) Evolution Process – Uses concepts of “Natural Selection” and “Genetic Inheritance” • Can be used to solve a variety of problems that are not easy to be solved using traditional techniques
  • 11. “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions you might not otherwise find in a lifetime.” - Salvatore Mangano Computer Design, May 1995 Genetic Algorithms - History
  • 12. Biological Evolution Process “Natural Selection” + “Genetic Inheritance”
  • 13. Principle Of Natural Selection 19 • IF there are organisms that reproduce, and • IF offsprings inherit traits from their 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 • THEN those members with more-adaptive traits (determined by the environment) will survive The result is the evolution of species.
  • 14. Basic Idea of Principle of Natural Selection 20 “Select The Best, Discard The Rest”
  • 15. An Example of Natural Selection 21 • Giraffes have long necks. Giraffes with slightly longer necks could feed on leaves of higher branches when all lower ones had been eaten off.  They had a better chance of survival.  Favorable characteristic propagated through generations of giraffes.  Now, evolved species has long necks. NOTE: Longer necks may have been a deviant characteristic (mutation) initially, but since it was favorable, was propagated over generations. Now an established trait. So, some mutations are beneficial.
  • 16. Natural Selection 22 Initial Population Of Animals Struggle For Existence-Survival Of the Fittest Surviving Individuals Reproduce, Propagate Favorable Characteristics Millions Of Years Evolved Species (Favorable Characteristic Now A Trait Of Species) CS.Stonybrook.edu
  • 17.
  • 18. What Are Genetic Algorithms (GAs)? 24 Genetic Algorithms are search and optimization techniques based on Darwin’s Principle of Natural Selection. Genetic Algorithms implement optimization strategies by simulating evolution of species through natural selection.
  • 19. Some Definitions Chromosomes: an individual in the population in GA is composed of an array of bits (genes) that takes a value for each chromosome represents a solution to problem under consideration. Gene: a particular bit in a chromosome that takes a value and model a specific trait in a solution. Population: is a constant size number of chromosomes and represents a pool of feasible solutions. Genotype: is a genetic structure (bits organization) of an individual solution. Phenotype: it’s the actual solution itself.