Presentation is loading. Please wait.

Presentation is loading. Please wait.

Genetic Algorithms.

Similar presentations


Presentation on theme: "Genetic Algorithms."— Presentation transcript:

1 Genetic Algorithms

2 Evolution Here’s a very oversimplified description of how evolution works in biology 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 sexual reproduction (offspring have 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

3 Genotypes and phenotypes
Genes are the basic “instructions” for building an organism A chromosome is a sequence of genes Biologists distinguish between an organism’s genotype (the genes and chromosomes) and its phenotype (what the organism actually is like) Example: You might have genes to be tall, but never grow to be tall for other reasons (such as poor diet) Similarly, “genes” may describe a possible solution to a problem, without actually being the solution

4 What Do the Following 3 Things Have in Common?
JET engine in a BOEING 777, Criminal face recognition through eye-witness recollection, computers that program themselves

5 Genetic Algorithms (GAs)
GAs design jet engines. GAs draw criminals. GAs program computers.

6 DEFINATION A genetic algorithm (or short GA) is a search technique used in computing to find true or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. Genetic algorithms are a particular class of evolutionary algorithms that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and recombination. 6

7 Genetic Algorithm Presenting Generation Cycle

8 Travelling Salesman Problem
The traveling salesman problem is a simple problem: given a 2D graph of cities, what is the shortest circuit - the shortest route that visits each city exactly once? The triviality of this task is deceptive: it is, in fact, NP-complete: while many algorithms can produce a very good route, no known method exists of finding the shortest route without some measure of brute-force trial-and-error computation.

9 Travelling salesman problem Continue.
This application is an attempt to solve the Traveling Salesman Problem with a genetic algorithm. This algorithm creates a number of full solutions, measures their comparative finesses, and selects the best ones for a new generation of solutions, while also featuring genetic mutation, and immigration features. In this way, the algorithm borrows from the process of biological evolution in order to "evolve" a very good solution for the Traveling Salesman Problem in a short timeframe.

10 Basic Genetic Algorithm
Step 1. Generate a random population of n chromosomes Step 2. Assign a fitness to each individual Step 3. Repeat until n children have been produced Choose 2 parents based on fitness proportional selection Apply genetic operators to copies of the parents Produce new chromosomes

11 Fitness Function For each individual in the population, evaluate its relative fitness For a problem with m parameters, the fitness can be plotted in an m+1 dimensional space

12 Sample Search Space A randomly generated population of individuals will be randomly distributed throughout the search space Image from

13 Natural Selection The likelihood of any individual becoming a parent is directly proportional to its relative fitness Image from

14 Genetic Operators Cross-over Mutation

15 Production of New Chromosomes
2 parents give rise to 2 children

16 Generations As each new generation of n individuals is generated, they replace their parent generation To achieve the desired results, 500 to 5000 generations are required

17 Ultimate Goal Each subsequent generation will evolve toward the global maximum After sufficient generations a near optimal solution will be present in the population of chromosomes

18 Genetic Optimization With genetic algorithm optimization, we may have a more difficult time in coming up with a better solution than the computer program.  The genetic algorithm does not examine every single timing plan candidate either, but is a random guided search, capable of intelligently tracking down the global optimum solution.  As with the human race, the weakest candidates are eliminated from the gene pool, and each successive generation of individuals contains stronger and stronger characteristics.  It’s survival of the fittest, and the unique processes of crossover and mutation conspire to keep the species as strong as possible.

19 Genes and biological evolution
A gene is a unit of biological information transferred from one generation to another. Genes determine our physical traits, what you look like, what you inherit from either one of your parents.

20 Survival of The Fittest Origin of New Species
Biological Evolution Natural Selection Survival of The Fittest Origin of New Species

21 Examples of Biological Evolution and Natural Adaptation
Frog Skin Hollow Bones in Birds Biological Evolution of Human Characteristic Thumb Erect Vertebral Column Lower Jaw

22 Biological Evolution Cultural Evolution..?? Source:

23 Biological Evolution Meme..!!!

24 Meme “the basic unit of cultural transmission, or imitation”
- Richard Dawkins “an element of culture that may be considered to be passed on by non-genetic means” - English Oxford Dictionary

25 Genes and Memes, where they are similar
Genes propagate biologically from chromosome to chromosome Memes propagate from brain to brain via imitation Survival of fittest in meme Concept of God is survived though no scientific evidence is present

26 Genes and Memes, where they differ
Genes are pre-decided Genes are (almost always) static through generations, memes can be changed! Memes allow improvement After learning language, we contribute to it through literature New heuristics to search problems We use this property to improve algorithms

27 Genetic Algorithm solves (typically optimization) problems by combining features of candidate solutions to create new populations of candidate solutions. applicable to complex optimization problems, e.g., when it is hard to tackle the problem via an exact search approach.

28 Initialize population Pop Select Parents from Pop
Genetic Algorithm Initialize population Pop Evaluate Pop While not stop criterion do Select Parents from Pop Recombine Parents Evaluate Pop Return the best solution in Pop

29 Crossover Purpose: to combine features of feasible solutions already visited in order to provide new potential candidate solutions with better objective function value. Mechanism that restarts the search by “exploring” the space “between” solutions. parents offspring

30 Mutation Purpose: to introduce new characteristics in the population by random modifications. Explores the “neighborhood” of a solution. mutated gene value before after

31 Memetic Algorithm Initialize population Pop While not
Return the best solution in Pop While not stop criterion do Evaluate Pop Recombine Parents Select Parents from Pop Optimize Pop(Local search)


Download ppt "Genetic Algorithms."

Similar presentations


Ads by Google