genetic algorithm

16
GENETIC ALGORITH M Submitted by… Pratheeban R Register Number 103478165 Date 03/11/2012 Event Seminar 1

Upload: pratheeban-r

Post on 15-Nov-2014

594 views

Category:

Technology


2 download

DESCRIPTION

The GENETIC ALGORITHM is a model of machine learning which derives its behavior from a metaphor of the processes of EVOLUTION in nature. Genetic Algorithm (GA) is a search heuristic that mimics the process of natural selection. This heuristic (also sometimes called a metaheuristic) is routinely used to generate useful solutions to optimization and search problems.

TRANSCRIPT

Page 1: Genetic Algorithm

GENETIC ALGORIT

HMSubmitted by…

Pratheeban RRegister Number

103478165Date

03/11/2012Event

Seminar 1

Page 2: Genetic Algorithm

AgendaIntroductionBiological BackgroundSearch SpaceGenetic AlgorithmOutline of Basic GAOperators of GACrossoverMutationParameters of GARecommendationsApplication of GAAdvantage & DisAdvantage

Page 3: Genetic Algorithm

Introduction Inspired by Darwin's theory about EvolutionPart of Evolutionary ComputingRapid growing area of AIEA Idea – I. Rechenberg – 1960 - “Evolution Strategies”GA Invent & Develop – John Holland team – “Adaption and

Artificial Systems” - 1975 John Koza – 1992 – GA to evolve programs to perform

certain task – “Genetic Programming”

Page 4: Genetic Algorithm

Biological Background CHROMOSOMES

Each Cell – same set of chromosomes String of DNA & serves as model for whole organism Consist of Genes, blocks of DNA TRAIT - each Gene encodes a particular protein. E.g. Eye Color ALLELES - possible settings for Trait (e.g. blue, brown) LOCUS - each Gene’s own position in chromosome GENOME – complete set of genetic material GENOTYPE – particular set of genes in genome PHENOTYPE – genotype’s physical and mental characteristics (eye

color, intelligence) REPRODUCTION

CROSSOVER (RECOMBINATION) – 1st occurs during reproduction Genes from parents form in some way the whole new chromosome

(OFFSPRING) & can be Mutated MUTATION – elements of DNA are a bit change

This changes mainly caused by errors in copying genes from parents. FITNESS – measured by success of the organism in life

Page 5: Genetic Algorithm

Search SpaceSpace of all feasible solutions Each point in the search space represent one feasible

solutionEach feasible solution can be "marked" by its value or

fitness for the problem

Considered as good solution (not often possible to prove what is real optimum)

Page 6: Genetic Algorithm

Genetic AlgorithmSolution to a problem solved by genetic algorithms, is evolved

Algorithm is started with a set of solutions (represented by chromosomes) called Population

Solutions from one population are taken and used to form a new population for a better one.

Solutions which are selected to form new solutions (offspring) are selected according to their fitness - the more suitable they are the more chances they have to reproduce

Repeated until some condition is satisfied.

Page 7: Genetic Algorithm

Outline of the Basic Genetic Algorithm1. [Start] Generate random population of n chromosomes

(suitable solutions for the problem)2. [Fitness] Evaluate the fitness f(x) of each chromosome x in the

population3. [New population] Create a new population by repeating

following steps until the new population is complete1. [Selection] Select two parent chromosomes from a population

according to their fitness (the better fitness, the bigger chance to be selected)

2. [Crossover] With a crossover probability cross over the parents to form a new offspring (children). If no crossover was performed, offspring is an exact copy of parents.

3. [Mutation] With a mutation probability mutate new offspring at each locus (position in chromosome).

4. [Accepting] Place new offspring in a new population

4. [Replace] Use new generated population for a further run of algorithm

5. [Test] If the end condition is satisfied, stop, and return the best solution in current population

6. [Loop] Go to step 2

Page 8: Genetic Algorithm

Operators of GACrossover + Mutation

Encoding of a Chromosome

represent chromosome in Binary String

each chromosome has one binary stringeach bit in this string can represent some characteristic

of the solution(OR)

whole string can represent a numbermany ways to Encode – Depends on solved problem

Chromosome 1 1101100100110110Chromosome 2 1101111000011110

Page 9: Genetic Algorithm

CrossoverSelects genes from parent chromosomesCreates a new offspring

Depends on encoding of chromosomeSpecific crossover - specific problem – performance

improvement of GANew chromosomes will have good parts of old

chromosomes & better

Chromosome 1 11011 | 00100110110Chromosome 1 11011 | 00100110110

Offspring 1 11011 | 11000011110Offspring 2 11011 | 00100110110

Page 10: Genetic Algorithm

MutationPrevents falling all solutions in population into a local

optimum of solved problem (local extreme)Changes randomly the new offspring for binary encoding, switch random chosen bit from 0 to 1 /

1 to 0

Depends on encoding & crossoverShould not occur very often, else GA will change to

Random Search

Original offspring 1 1101111000011110Original offspring 2 1101100100110110Mutated offspring 1 1100111000011110Mutated offspring 2 1101101100110110

Page 11: Genetic Algorithm

Parameters of GA Probability of Crossover & Mutation

Crossover Probabilitycrossover performationno crossover – offspring is exact copy of parents if crossover – offspring is made from parts of parents100 % - all offsprings made by crossover0 % - exact copies of old population

Mutation Probabilitychromosome mutationno mutation – offspring crossover without any changeif mutation - part of chromosome is changed100 % - whole chromosome change0 % - no change

Page 12: Genetic Algorithm

Recommendations Crossover rate

should be high ~ 80% - 95%. for some problems ~ 60% is the best

Mutation rate mutation rate should be very low. best rates reported - 0.5% - 1%.

Population size best population size depends on size of encoded string very big population size usually does not improve performance of GA good population size is about 20-30 sometimes sizes 50-100 are reported as best 32 bits chromosome – population 32 16 bits chromosome - two times more than the best population size

Selection basic roulette wheel selection rank selection can be better simulated annealing – sophisticated methods elitism should be used try steady state selection.

Encoding Encoding depends on the problem & size of instance of the problem.

Crossover and mutation type Operators depend on encoding & problem.

Page 13: Genetic Algorithm

Applications of GANonlinear dynamical systems - predicting, data analysis

Designing neural networks, both architecture and weights

Robot trajectory

Evolving LISP programs (genetic programming)

Strategy planning

Finding shape of protein molecules

TSP and sequence scheduling

Functions for creating images

Page 14: Genetic Algorithm

Advantage & DisAdvantageAdvantage

parallelism travelling in a search space with more individuals so

they are less likely to get stuck in a local extreme like some other methods

easy to implementhave some GA, just write new chromosome to solve

another problemsame encoding - change the fitness function

DisAdvantagecomputational timeslower than some other methodschoosing encoding and fitness function can be difficultBut with today’s computers it is not so big problem

Page 15: Genetic Algorithm

Reference

Rechenberg, Ingo (1973). Evolutionsstrategie. Stuttgart: Holzmann-Froboog. ISBN 3-7728-0373-3.

Srinivas. M and Patnaik. L, "Adaptive probabilities of crossover and mutation in genetic algorithms," IEEE Transactions on System, Man and Cybernetics, vol.24, no.4, pp.656–667, 1994.

http://www.obitko.com/tutorials/genetic-algorithms/ga-basic-description.php

Page 16: Genetic Algorithm

Thank You!