1 / 12

Genetic Algorithms

Genetic Algorithms. Genetic algorithms are a form of local search that use methods based on evolution to make small changes to a popula- tion of chromosomes in an attempt to identify an optimal solution .

hera
Download Presentation

Genetic Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Genetic Algorithms

  2. Genetic algorithms are a form of local searchthat use methods based on evolution to make small changes to a popula-tion of chromosomes in an attempt to identify an optimal solution. • Genetic algorithms generate expressions which, when interpreted represent properties of a search enviroment and a set of responses to those properties. • The simplest example of these expressions are binary strings.

  3. Given a search problem as input a genetic algorithm would generate a random set of expressions each detailing a potential solution to the problem. • It is likely that none of these solutions will be very good, given a complex enough problem. • Each of these strings are refered to as a chromosome, and each bit is refered to as a gene. • The set of chromosomes are called a population.

  4. Basic Genetic Algorithm: • 1) generate the starting set of chromosomes. • 2) evalute each chromosome to determine how well it solves the problem, this establishes the "fitness" of a chromosome. • 3) If a chromosome is present with an acceptable solution to the problem, halt and use that solution. • 4) Update the the set of chromosomes • 5) repeat steps 2->4

  5. Evaluation: • The evaluation of a chromosome is usually just a test to see how well the instructions contained in the chromosome work on the problem. However for complex or time consuming problems other evaluation function are sometimes necessary. • Termination Criteria: • Termination is generally subject to the nature of the problem. In some instances with a specific solution the algorithm halts when it reaches that solution, or an acceptable approximation. • However some problems require human interaction to determine a stopping point, or a set number of iterations to take.

  6. Updating the Population: • The procedure taken to update a population has variations, however in all cases some type of reproduction occours and new chromosomes evolve and become the new population. • As a rule each chromosome must be the same length, however the population size can remain constant or be variable. • The two methods of reproduction are Crossover and Mutation.

  7. Crossover is based on how strands of DNA recombine. • There are several variations on Crossover, however a simple example would be: • given the parents   0 0 1 0 1 1  and   1 0 1  1 0 0, with a division chosen at the midpoint, the resulting children would be:    0 0 1 1 0 0 and 1 0 1 0 11 • Variation on Crossover include: multipoint crossover which divides a chromosome differently and more than one time, uniform crossover, which randomly selects which parent each bit will come from, and cloning in which a single parent replicates itself. • Mutation is another option for reproduction in which a single bit in a chromosome is changed .

  8. Depending on the implementation andthe use of the genetic algorithm other variations include:  • Allowing very fit chromosomes to survive or have higher reproduction rates. • Using mutation to introduces randomness, (this is usually a low chance). • Some genetic algorithms remove chromosomes from the population before reproduction occours , usually based on fittness with less fit chromosomes having a lesser chance of survival. This simulates competition.

  9. Genetic Algorithms are a local search method similar to hill climbing or simulated annealing. • The effectiveness of genetic algorithms can be explained biologically: small changes that occour on a selective basis combined with reproduction tend to improve the fitness of a population over time...... However(really boring bit)

  10. John Holland invented schemata to provide a more rigorous proof of the effectiveness of genetic algorithms. • Schemata are chromosomes with a * in different positions. • ex) 1*1 -> this could be used to match both 111 and 101. • Schemata can be developed to represent a population or part of a population, a Schemata can also have a fitness based on the fitness of the chromosomes it matches.(just average their fitnesses) • This can be used to show the likelihood of certine schemata surviving to a new generation..... (tons of math.... but this is the final equation) Basically this just states: Short low order(few *'s) schema which are fitter than the average population will appear with exponentially increasing regularity in subsequent generations...... ok back to less boring stuff

  11. Prisoner's Dilemma: • Bits are chosen to represent stratagies: cooperate, turn the other person in, tit-for-tat, ect. • The algorithm was shown to converge to the most optimal playing strategy against simple opponents within the first 5 generations. • When each chromosome was allowed to "play" against other chromosomes to evaluate fitness some chromosomes developed strategies which were as good as the best heuristic models developed by humans. • Allowing the chromosomes to influence fittness test is similar to introducing a predator, the chomosomes which survive are made more robust due to competition.

  12. Other Problems Genetic Algorithms are used to solve: • combinatorial search problems, the knights tour, robot navigation, the knapsack problem, the timetable problem. • Genetic algorithms are also used to train other types of learning algorithms (Grant will discuss this in more depth). In general any learning algorithm with adjustable mechanisms can be modeled by a chromosome, and a genetic algorithm can be used to find the best set of varibles for the algorithm to use on a given problem. • one last thing: http://picbreeder.org/

More Related