0% found this document useful (0 votes)
11 views14 pages

Genetic Algorithm

Uploaded by

Hossam Reda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views14 pages

Genetic Algorithm

Uploaded by

Hossam Reda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

GENETIC

ALGORITHM
INTRODUCTION
• Genetic Algorithm GA is a search-based optimization technique based on
the principles of genetics and natural selection . It is frequently used to
find to find optimal or near-optimal solutions to difficult problems which
otherwise would take a lifetime to solve
• Genetic Algorithm GA is one of optimization techniques which is used in
industry to provide better results
• Optimization is the process of making something better
INTRODUCTION
BASIC TERMINOLOGY
• Population :- it is a subset of all the possible
(encoded) solutions to the given problem
• Chromosomes :- a chromosome is one such
solution to the given problem
• Gene :- gene is one element position of a
chromosome
• Allele :- it is the value a gene takes for a
particular chromosome
GA-FLOWCHART

Population Fitness
Initialization Function
Calculatio Crossove
n r
Mutation Survivor
Selectio
Terminate
n
and best
POPULATION INITIALIZATION

• It is usually the first operator applied on


Population. chromosomes are selected from
the population of parents to cross over and
produce offspring .it is based on Darwin’s
evolution theory of “survival of the fittest”
Therefore, this operation is also known
“selection operation”
FITNESS FUNCTION CALCULATION

• Fitness function simply defined is a function which takes the solution as


input and produce the suitability of the solution as output. In some cases,
the fitness function and the objective function may be the same while in
others it might be different based on the equation or problem
• The objective of fitness is to either maximize or minimize the given
equation
• As example 3A+15C+D=102 population 3 solutions (2,7,11) ,(5,10,4),
(1,12,32) for A ,C,D . at some solution 85 consider fitness or objective
function solution
CROSS OVER
• After reproduction phase ,population is
enriched with better individuals .it makes
clones of good strings but doesn’t create new
ones. Cross over operator is applied to the
mating pool with a hope that it would create
better strings
CROSS OVER
MUTATION
• After cross over ,the strings are
subjected to mutation, mutation
involves flipping it , change 0 to
1 and vice versa
• Mutation alters one or more
genes values in a chromosome
from initial state
MUTATION
SURVIVOR SELECTION
• Parents are selected according to their
fitness
• The better chromosomes are ,the more
chances to be selected they have
SURVIVOR SELECTION
• Imagine a roulette wheel where are placed all chromosomes in
population ,every has its place big accordingly to its fitness function
TERMINATION

Final problem is to decide when to stop execution of algorithm. Three


possible ways.
a) First approach:
• Stop after production of definite number of generations
b) Second approach:
• Stop when the improvement in average fitness over two generations is below a
threshold

c) The time is over

You might also like