Top Banner
An overview of Genetic Algorithm By David Beasley, David R. Bull and Ralph R. Martin 090070T – T.P.K. Dahanayakage 090150N – K.M.T.V.
25

Genetic Algorithm

May 11, 2015

Download

Technology

This is an explanation of what is genetic algorithm and the use of it.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Genetic Algorithm

An overview of Genetic AlgorithmBy David Beasley, David R. Bull and Ralph R. Martin

090070T – T.P.K. Dahanayakage090150N – K.M.T.V. Ganegedara

Page 2: Genetic Algorithm

Introduction

Population Evolves Natural Selection Survival of the fittest

Applications? Computer, Bridges, Garment, etc.

Page 3: Genetic Algorithm

Analogy

Think about successive generations

Page 4: Genetic Algorithm

Analogy (ctd)

Evolve according to environment

Super-fit

Page 5: Genetic Algorithm

Basic Concept

Set of solutions for a problem Each solution – fitness score

Reproduce a new set of solutions by “Cross-breeding” Most-fit: get selected Least-fit: not selected – die out

Result? Offsprings with characteristics from most-fit

Page 6: Genetic Algorithm

What just happened?

Good characteristics of a generation was spread in a successive generation

Most promising areas of solution space are searched

Page 7: Genetic Algorithm

Algorithm

BEGINGenerate populationCalculate fitness for each individualWHILE NOT CONVERGED DOBEGIN

FOR population_size/2 DOBEGIN

Select 2 parents for matingCombine and produce an offspringCalculate the fitness for the new individualInsert the offspring to the new generation

END

END

END

Page 8: Genetic Algorithm

Lesson on Biology

Chromosome Organized collection of coiled DNA

DNA

Page 9: Genetic Algorithm

Fitness function

Must represent the “fitness to the environment” or “ability” of a chromosome’s

Issues of fitness range Premature convergence Slow finishing

Page 10: Genetic Algorithm

Reproduction

Selection of parents Random Favors the fittest

Crossover Single point crossover

Cut 2 chromosomes at a random point Swap over tails to create 2 new chromosomes

Page 11: Genetic Algorithm

Reproduction (ctd)

Crossover is not the only case! 0.6 - 1.0 chance Otherwise replicate the parent

Mutation Alter the genes of crossover-ed with a

small probability

Page 12: Genetic Algorithm

Example

0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 0 0 1

0 1 0 1 0 0 1 0 0 1 1 0 1 1 0 0 1 1 0 0

0 1 0 1 0 0 1 0 0 1

0 1 0 1 1 0 1 0 0 1

Before mutation:

After mutation:

Page 13: Genetic Algorithm

Convergence

Fitness of the BEST and AVERAGE moves to a global optimum

Gene is said to have converged 95% of the population has converged

Population is said to have converged All the genes have converged

Page 14: Genetic Algorithm

Other techniques

Page 15: Genetic Algorithm

“Schemata” and “Scheme”

Definition of Schema Pattern of gene String comprise {0,1,#}

Ex: Chromosome 0110 contains following “Schemata” #110, #1#0, 01##, etc.

A chromosome is said to contain a schema if it matches a particular schemata

Page 16: Genetic Algorithm

Order of schema – Number of non-# symbols

Length of schema – Distance between outer most non-# symbols.

Ex: #1#0

Page 17: Genetic Algorithm

Schema Theorem

Individuals in a population are given reproductive trials

Number of trials α Fitness of an individual Higher fitness value -> Good schemata

Good Schemata receives exponentially increasing number of trials in successive generations!

Page 18: Genetic Algorithm

Building Block Hypothesis

Definition Schemata short in length and tend to

improve performance when incorporated to an individual

Properties of a successful coding scheme Related genes close together Little interaction between genes

Page 19: Genetic Algorithm

Exploration and Exploitation

Exploration Exploring unknown areas

Exploitation Utilizing already-learnt to find better solutions

Tradeoff Ex: Random search and Hill climbing

GA combines both in an optimal way!

Page 20: Genetic Algorithm

Practical Aspects of GA

Page 21: Genetic Algorithm

Parent selection

Individuals are copied to a “mating pool” Highly fit – more copies Less fit – lesser copies

How to determine number of copies? Explicit fitness remapping Implicit fitness remapping

Page 22: Genetic Algorithm

Explicit fitness remapping

Individual’s fitnessAverage fitness of population

Issue: Number of copies should be an integer

Solution: Fitness scaling Fitness windowing

Page 23: Genetic Algorithm

Implicit fitness remapping

Tournament selection 2 random individuals Copy the one with higher fitness value

to the mating pool Continue until the pool is full

Page 24: Genetic Algorithm

Generation gaps and steady-state replacement

Generation gap Proportion of individuals in a population replaced

in each generation

Steady-state replacement Only few individuals are replaced in a generation Considerations:

Parent selection – Random, Fitness Replacement – Random, Inverse fitness

Page 25: Genetic Algorithm

Thank you

Q & A Session