Genetic Algorithm

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Genetic Algorithm - Presentation Transcript

    1. GENETIC ALGORITHMS
      Rohith Nandakumar
      S7 CS
      06348
    2. INTRODUCTION
      Genes are the basic “instructions” for building an organism
      Gene represents a specific trait of
      the organism. Ex: Eye color
      A gene may have different settings
      A chromosome is a sequence of genes
    3. EVOLUTION
      Organisms (animals or plants) produce a number of offspring which are almost, but not entirely, like themselves
      Variation may be due to mutation (random changes)
      Variation may be due to combination of some characteristics from each parent
      Some of these offspring may survive to produce offspring of their own - some won’t
      The “better adapted” offspring are more likely to survive
      Over time, later generations become better and better adapted
      Genetic algorithms use this same process to “evolve” better programs
    4. GENETIC ALGORITHMS
      Inspired by Darwin's theory about evolution
      Theyare a part of evolutionary computing, which is a rapidly growing area of artificial intelligence
      Idea of evolutionary computing was introduced in the 1960s by I.Rechenberg
      Genetic Algorithms (GAs) were invented by John Holland
      In 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
    5. THE BASIC ALGORITHM
      Suppose your “organisms” are 32-bit computer words
      You want a string in which all the bits are ones
      Here’s how you can do it:
      Create 100 randomly generated computer words
      Repeatedly do the following:
      Count the 1 bits in each word
      Exit if any of the words have all 32 bits set to 1
      Keep 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 words
      Take the first half of this word and combine it with the second half of the other word
      Pick a random bit in the word and toggle (change) it
      Note that this procedure does not guarantee that the next “generation” will have more 1 bits, but it’s likely
    6. ENCODING
      The chromosome should in some way contain information about solution which it represents
      The most used way of encoding is a binary string. The chromosome then could look like this:
      Each chromosome has one binary string
      Each bit in this string can represent some characteristic of the solution. Or the whole string can represent a number.
    7. CROSSOVER
      Crossover selects genes from parent chromosomes and creates a new offspring
      A crossover point is chosen at random
      Everything 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 crossover
      Specific crossover made for a specific problem can improve performance of the genetic algorithm
    8. MUTATION
      Mutation prevents the algorithm to be trapped in a local minima
      Changes are made in the offspring randomly
      The mutation depends on the encoding as well as the crossover.
    9. SELECTION
      Chromosomes are selected from the population to be parents to crossover
      Main idea: better individuals get higher chance to reproduce
      Chances proportional to fitness
      Implementation: Roulette Wheel technique
      • Assign to each individual a part of the roulette wheel
      • Spin the wheel n times to select n individuals
    10. AN EXAMPLE:TRAVELLING SALESMAN PROBLEM
    11. 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)
    12. 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.
    13. 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)
    14. 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)
    15. 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)
    16. 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)
    17. 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.
    18. 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)
    19. 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)
    20. GENETIC PROGRAMMING
      A string of bits could represent a program
      If you want a program to do something, you might try to evolve one
      As a concrete example, suppose you want a program to help you choose stocks in the stock market
      There is a huge amount of data, going back many years
      What 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
    21. APPLICATIONS OF GA
      Travelling Salesman Problem
      Artificial Life (A-Life)
      Robotics
      Automotive Design
      Evolvable Hardware
      Computer Gaming
      Optimizing Chemical Kinetic Analysis
      Encryption and Code Breaking
    22. CONCLUSION
      Genetic algorithms are -
      Fun! They are enjoyable to program and to work with
      Mind-bogglingly slow - you don’t want to use them if you have any alternatives
      Good for a very few types of problems
      Genetic algorithms can sometimes come up with a solution when you can see no other way of tackling the problem
    23. Q & A
      ?
    24. THANKYOU…

    + rabidityfactorrabidityfactor, 1 month ago

    custom

    176 views, 0 favs, 0 embeds more stats

    A brief idea about the basic working of genetic alg more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 176
      • 176 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories