0% found this document useful (0 votes)
11 views

Module 6-1

The document discusses genetic algorithms and their biological inspiration from genetics and evolution. It provides background on genetic algorithms and their key components like chromosomes, genes, alleles, and how natural selection and reproduction are simulated.

Uploaded by

dijodaison7
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Module 6-1

The document discusses genetic algorithms and their biological inspiration from genetics and evolution. It provides background on genetic algorithms and their key components like chromosomes, genes, alleles, and how natural selection and reproduction are simulated.

Uploaded by

dijodaison7
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

GENETIC ALGORITHM

APPLICATIONS OF
GENETIC ALGORITHMS

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Classes of Search Techniques


Search Techniqes

Calculus Base Guided random search Enumerative


Techniqes techniqes Techniqes

Fibonacci Sort DFS Dynamic BFS


Programming

Tabular Search Hill Climbing Simulated Evolutionary


Anealing Algorithms

Genetic Genetic
Programming Algorithms

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Biological Background – The Cell
 Every cell is a complex of many small “factories”
 working together.
 The center of this all is the cell nucleus.
 The nucleus contains the genetic information.

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

General Introduction to GAs Biological Background– Chromosomes


 Genetic algorithms (GAs) are a technique to solve problems which  Genetic information is stored in the chromosomes.
need optimization.
 Each chromosome is build of DNA.
 GAs are a subclass of Evolutionary Computing and are random
search algorithms.  Chromosomes in humans form pairs.

 GAs are based on Darwin’s theory of evolution.  There are 23 pairs.

 The chromosome is divided in parts: genes.

 Genes code for properties.


 History of GAs:
• Evolutionary computing evolved in the 1960s.  The posibilities of the genes for one property is called: allele.
• GAs were created by John Holland in the mid-1970s.
 Every gene has an unique position on the chromosome: locus.
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Biological Background– Genetics Biological Background– Reproduction
 The entire combination of genes is called genotype.
 A genotype develops into a phenotype.
 Alleles can be either dominant or recessive.  After meiotic division 2 gametes
 Dominant alleles will always express from the genotype to the appear in the process.
fenotype.
 Recessive alleles can survive in the population for many  In reproduction two gametes
generations without being expressed. conjugate to a zygote wich will
become the new individual.

 Hence genetic information is


shared between the parents in
order to create new offspring.

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Biological Background– Reproduction Biological Background (6) – Natural Selection


 Reproduction of genetical  The origin of species: “Preservation of favorable variations and
information: rejection of unfavorable variations.”
• Mitosis,
• Meiosis.  There are more individuals born than can survive, so there is a
continuous struggle for life.
 Mitosis is copying the same
genetic information to new  Individuals with an advantage have a greater chance for survive:
offspring: there is no survival of the fittest. For example, Giraffes with long necks.
exchange of information.
 Genetic variations due to crossover and mutation.
 Mitosis is the normal way of
growing of multicell structures,
like organs.

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Genetic Algorithm (1) – Search Space Comparison of Natural and GA Terminology
 Most often one is looking for the
best solution in a specific subset Natural Genetic Algorithm
of solutions. 2.5
Chromosome String
 This subset is called the search Gene Feature or character
space (or state space). 2

Allele Feature value


 Every point in the search space is 1.5
Locus String position
a possible solution. Genotype Structure
 Therefore every point has a
1

Phenotype Parameter set, a decoded structure


fitness value, depending on the 0.5

problem definition.

0

GAs are used to search the search 0 100 200 300 400 500 600 700 800 900 1000

space for the best solution, e.g. a


minimum.
 Difficulties are the local minima
and the starting point of the
search. Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Genetic Algorithm– Basic Algorithm


 Starting with a subset of n randomly chosen solutions from the
search space (i.e. chromosomes).
This is the population.

 This population is used to produce a next generation of


individuals by reproduction.

 Individuals with a higher fitness have more chance to reproduce


(i.e. natural selection).

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Genetic Algorithm (3) – Basic Algorithm

Outline of the basic algorithm


• All individuals in population
evaluated by fitness function. 0 START : Create random population of n chromosomes
1 FITNESS : Evaluate fitness f(x) of each chromosome in the
population
• Individuals allowed to 2 NEW POPULATION
reproduce (selection), 1 REPRODUCTION/SELECTION : Based on f(x)
2 CROSS OVER : Cross-over chromosomes
crossover, mutate. 3 MUTATION : Mutate chromosomes

3 REPLACE : Replace old with new population: the new generation


4 TEST : Test problem criterium
5 LOOP : Continue step 1 – 4 untill criterium is satisfied

Flowchart of GA
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
OPERATORS IN GA

• Coding
• Selection
• Crossover/Recombination
• Mutation

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

ENCODING/CODING
• Process of representing individual gene
• Depends mainly on solving the problem
• Different coding techniques are
– Binary encoding
– Octal encoding
– Hexadecimal encoding
– Permutation/Real number Encoding
– Value encoding
– Tree encoding
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Binary Encoding Hexadecimal Encoding
• Each chromosome encodes a binary string • Each chromosome encodes a hexadecimal string
• Each bit represent some characteristics • From 0- 9,A-F

CHROMOSOME 1 110100011010 CHROMOSOME 1 9CE7


CHROMOSOME 2 110111111010 CHROMOSOME 2 3DBA

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Octal Encoding Permutation Encoding


• Each chromosome encodes an octal string • Each chromosome encodes a string of numbers
• From 0- 7 represented in sequence
• Only useful for ordering problem
CHROMOSOME 1 03467216 CHROMOSOME 1 153264798
CHROMOSOME 2 72561423 CHROMOSOME 2 856723149

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Value Encoding SELECTION
• Each chromosome encodes a string of values and • Selection is the process of choosing 2 parents
values can be anything concerning the problem from population for crossing
• After deciding an encoding next step is to
decide how to perform selection
CHROMOSOME 1 1.2354 3.5687 4.7894 5.897461 • Selection is the method that randomly pick
chromosomes out of the population according
CHROMOSOME 2 ASDFGERTYUILKJGF
to their evaluation function
CHROMOSOME 3 (back),(back),(forward), (right), (left)
• The higher the fitness function value , the better
chance that an individual will be selected
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

SELECTION
• The selection pressure is defined as the degree to which the
better individuals are favored
• The higher the selection pressured, the more the individuals are
favored
• The convergence rate of GA is largely determined by the
magnitude of the selection pressure
• Higher selection pressure resulting in the higher convergence
rate
• If the selection pressure is too low, the convergence rate will be
slow and the GA will take unnecessarily longer to find the
optimal solution
• If the selection pressure is too high , there is an increased change
of the GA prematurely converging to an incorrect solution
Arsha J K,AP,Computer Science and Arsha
Computer
J K,AP,Computer
Science and Engineering,
Science and
Engineering, VJCET, Vazhakulam Engineering,
VJCET,VJCET,
Vazhakulam
Vazhakulam
SELECTION
• Two type of selection scheme
SELECTION
– Proportionate based selection • Various selection methods are
• Pick out the individuals based upon their fitness values
relative to the fitness of other individuals in the – Roulette Wheel Selection
population – Random Selection
• Selection pressure depends on the fitness – Rank Selection
– Ordinal based selection – Tournament Selection
• Not based on their fitness value
– Boltzmann Selection
• Upon the rank within the population
– Stochastic Universal Sampling
• Selection pressure is independent of the fitness

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Roulette Wheel Selection

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Roulette Wheel Selection Roulette Wheel Selection
• Consider a circular wheel.
• The wheel is divided into n pies, where n is the number
of individuals in the population. • Easier to implement
• Each individual gets a portion of the circle which is • But Noisy
proportional to its fitness value.
• Depends on the variance of fitness in the
• In a roulette wheel selection, the circular wheel is
divided as described before. population
• A fixed point is chosen on the wheel circumference as
shown and the wheel is rotated.
• The region of the wheel which comes in front of the
fixed point is chosen as the parent.
• For the second parent, the same process is repeated.
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Roulette Wheel Selection


• It is clear that a fitter individual has a greater pie on Random Selection
the wheel and therefore a greater chance of landing
in front of the fixed point when the wheel is • Randomly selects a parent from the population
rotated. • A little more disruptive
• Therefore, the probability of choosing an individual
depends directly on its fitness.
• Implementation wise, we use the following steps –
– Calculate S = the sum of a fitnesses.
– Generate a random number between 0 and S.
– Starting from the top of the population, keep adding the
finesses to the partial sum P, till P<S.
– The individual for which P exceeds S is the chosen
individual.
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Rank Selection Rank Selection
• Rank selection ranks the population and every • There are many ways for rank selection
chromosome receives fitness from the ranking – Select a pair of individual at random. Generate a
• The worst has fitness 1 and the best has fitness N random number R between 0 and 1 . If R<r use the
first individual as parent. This is repeated to select the
• It results in slow convergence but prevents too second parent. The value of r is a parameter to this
quick convergence method
• It also keep up selection pressure when the – Select two individuals at random. The individual with
fitness variance is low a highest evaluation become the parent. Repeat to
find the second parent
• Preserve diversity

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Tournament Selection

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Tournament Selection Stochastic Universal Sampling
• In K-Way tournament selection, we select K • Stochastic Universal Sampling is quite similar to
individuals from the population at random and Roulette wheel selection, however instead of having
select the best out of these to become a parent. just one fixed point, we have multiple fixed points as
shown in the following image.
• The same process is repeated for selecting the • Therefore, all the parents are chosen in just one spin
next parent. of the wheel.
• Tournament Selection is also extremely popular • Also, such a setup encourages the highly fit
in literature as it can even work with negative individuals to be chosen at least once.
fitness values.

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Boltzmann Selection
• This method simulates the process of slow cooling of molten
metal to achieve the minimum function value in a
minimization problem
• Controlling a temperature like parameter introduced with the
concept of Boltzmann probability distribution simulate the
cooling phenomenon
• In Boltzmann selection, a continuously varying temperature
controls the rate of selection according to a preset schedule
• The temperature start out high, which means that the
selection pressure is low
• The temperature is gradually lowered, which gradually
increase the selection pressure
• Thereby allowing the GA to narrow in more closely to the
best part of the search
Arshaspace
J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
CROSSOVER CROSSOVER
• Cross over is a process of taking two parent • Various crossover techniques are
solution and producing from them a child – Single- point Crossover

• After the selection process the population is Two- point crossover
– Multipoint cross over/N point cross over
enriched with better individuals
– Uniform Crossover
• Reproduction makes the clone of good strings – Three parent Crossover
but does not create new one – Crossover with reduced Surrogate
• Crossover operator is applied to the matting – Shuffle crossover
– Precedence Preservative Crossover
pool with a hope that it creates a better
– Ordered crossover
offspring
– Partially matched crossover
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

CROSSOVER Single-Point Crossover


• Cross over is a recombination operator that • In this one-point crossover, a random crossover point is
selected and the tails of its two parents are swapped to
proceeds in three steps
get new off-springs.
1. The reproduction operator select at random a
pair of 2 individual strings for the matting
2. A cross site is selected at random along the
string length
3. Finally, the position values are swapped
between the two strings following the cross
site

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Two-Point Crossover
• Two crossover points are chosen and the content between
these points are exchanged between two matted parents

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Uniform Crossover
Two-Point Crossover
• But with one point cross over , the head and tail of
one chromosome cannot be passed together to the
offspring PARENT 1 10110011
• If both the head and tail of chromosome contain PARENT 2 00011010
good genetic information, none of the offspring MASK 11010110
obtain directly with the one point crossover
CHILD 1 10011010
• Using two point crossover one can overcome these
CHILD 2 00110011
drawbacks so it is better than one point cross over

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Multi-Point Crossover/ Uniform Crossover


(N-Point crossover) • Each gene in the offspring is created by copying the corresponding
gene from the one or other parent chosen according to the random
• Multi point crossover is a generalization of the one-point generated binary crossover mask of same length as the
crossover wherein alternating segments are swapped to chromosome
get new off-springs. • Where there is a 1 in the crossover point, the gene is copied from
the first parent
• Where there is a 0 in the mask , the gene is copied from the second
parent
• A new crossover mask is generated for each parent pair
• Offspring therefore contain a mixture of gene from each parent
• The number of effective crossing point is not fixed , but will be the
average of L/2 where L is the chromosome length

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Three- Parent Crossover
Uniform Crossover

PARENT 1 11010001
PARENT 2 01101001
PARENT 3 01101100
CHILD 01101001

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Genetic Algorithm – Uniform Crossover


Three- Parent Crossover
Generate uniformly random number.
• Three parents are randomly chosen
X1 = 0110001010 • Each bit of the first parent is compared with
X2 = 1100000111 the bit of second parent.
Uniformly generated = 1 0 0 0 0 0 1 0 0 0
• If both are same, the bit is taken for the
As a result, the new population becomes,
offspring
X1 = 1110000010 • Otherwise bit from the third parent is taken
for the offspring
X2 = 0100001111

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Precedence Preservative Crossover
Crossover with Reduced Surrogate
(PPX)
The reduced surrogate operator constrains
crossover to always produce new individuals • Developed for vehicle routing problems
wherever possible. • The operator passes on precedence relation of
operations given in two parental permutations to
one offspring at the same rate, while no new
This is implemented by restricting the location of
precedence relations are introduced
crossover points such that crossover points
only occur where gene values differ.

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

1. A vector of length Sigma, sub i=1to mi, representing the


Shuffle Crossover number of operations involved in the problem, is randomly
filled with elements of the set {1, 2}.
Shuffle crossover is related to uniform crossover. 2. This vector defines the order in which the operations are
A single crossover position (as in single-point successively drawn from parent 1 and parent 2.
crossover) is selected. 3. We can also consider the parent and offspring
But before the variables are exchanged, they are permutations as lists, for which the operations append
randomly shuffled in both parents. and delete are defined.
4. First we start by initializing an empty offspring.
After recombination, the variables in the 5. The leftmost operation in one of the two parents is selected
offspring are un shuffled. in accordance with the order of parents given in the vector.
6. After an operation is selected it is deleted in both parents.
This removes positional bias as the variables are 7. Finally the selected operation is appended to the offspring.
randomly reassigned each time crossover is 8. This step is repeated until both parents are empty and the
performed. Arsha J K,AP,Computer Science and offspring contains all operations involved.
Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Precedence Preservative Crossover
(PPX)

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Ordered Crossover Partially Matched Crossover


• Ordered two-point crossover is used when the problem is of (PMX)
order based, for example in U-shaped assembly line • PMX can be applied usefully in the TSP.
balancing etc. • Indeed, TSP chromosomes are simply sequences of
• Given two parent chromosomes, two random crossover integers, where each integer represents a different city
points are selected partitioning them into a left, middle and and the order represents the time at which a city is
right portion.
visited.
• The ordered two-point crossover behaves in the following
way: • Under this representation, known as permutation
child 1 inherits its left and right section from parent 1, encoding, we are only interested in labels .
and its middle section is determined by the genes in the • It may be viewed as a crossover of permutations that
middle section of parent 1 in the order in which the values guarantees that all positions are found exactly once in
appear in parent 2. each offspring, i.e. both 3 offspring receive a full
• A similar process is applied to determine child 2. complement of genes, followed by the corresponding
Arsha J K,AP,Computer Science and filling in of alleles from their parents.
Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Partially Matched Crossover
(PMX)
• PMX proceeds as follows:
1. The two chromosomes are aligned.
2. Two crossing sites are selected uniformly at random
along the strings, defining a matching section
3. The matching section is used to effect a cross through
position by-position exchange operation
4. Alleles are moved to their new positions in the offspring

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Consider the two strings shown in Fig


 Where, the dots mark the selected cross points.
The matching section defines the position-wise exchanges
that must take place in both parents to produce the offspring.
The exchanges are read from the matching section of one
chromosome to that of the other.
In the example, the numbers that exchange places are 5 and
2, 6 and 3, and 7 and 10.
The resulting offspring are as shown

exchange places are 5 and 2, 6 and 3, and 7 and 10.

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Crossover Probability Mutation Methods
The basic parameter in crossover technique is the crossover
probability (Pc). Flipping
Crossover probability is a parameter to describe how often Interchanging
crossover will be performed.
 If there is no crossover, offspring are exact copies of Reversing
parents. If there is crossover, offspring are made from parts
of both parent’s chromosome.
 If crossover probability is 100%, then all offspring are
made by crossover.
 If it is 0%, whole new generation is made from exact
copies of chromosomes from old population (but this does
not mean that the new generation is the same!).

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Flipping
Mutation
 After crossover, the strings are subjected to mutation. Flipping of a bit involves changing 0 to 1 and 1 to
Mutation prevents the algorithm to be trapped in a 0 based on a mutation chromosome generated.
local minimum.
A parent is considered and a mutation
 Mutation plays the role of recovering the lost genetic
materials as well as for randomly disturbing genetic chromosome is randomly generated.
information.
 It is an insurance policy against the irreversible loss of
genetic material. Mutation has traditionally considered
as a simple search operator.
 If crossover is supposed to exploit the current solution
to find better ones, mutation is supposed to help for the
exploration of the whole search space.
 Mutation of a bit involves flipping a bit, changing 0 to 1
and vice-versa.
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Interchanging Mutation Probability
 The important parameter in the mutation technique is
Two random positions of the string are the mutation probability (Pm).
 The mutation probability decides how often parts of
chosen and the bits corresponding to chromosome will be mutated.
those positions are interchanged.  If there is no mutation, offspring are generated
immediately after crossover (or directly copied)
without any change.
 If mutation is performed, one or more parts of a
chromosome are changed. If mutation probability is
100%, whole chromosome is changed.
 if it is 0%, nothing is changed.
 Mutation generally prevents the GA from falling into
local extremes.
 Mutation should not occur very often, because then GA
will in fact change to random search.
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Reversing Replacement
• Replacement is the last stage of any breeding
A random position is chosen and the bits
cycle. Two parents are drawn from a fixed size
next to that position are reversed and population, they breed two children, but not all
child chromosome is produced. four can return to the population, so two must
be replaced. The technique used to decide
which individual stay in a population and which
are replaced in on a par with the selection in
influencing convergence. Basically, there are
two kinds of methods for maintaining the
population; generational updates and steady
state updates.
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Generational update scheme Random Replacement
The basic generational update scheme The children replace two randomly chosen
consists in producing N children from a
population of size N to form the individuals in the population. The parents
population at the next time step are also candidates for selection. This can
(generation), and this new population of be useful for continuing the search in
children completely replaces the parent small populations, since weak individuals
selection. Clearly this kind of update can be introduced into the population.
implies that an individual can only
reproduce with individuals from the
same generation.
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Steady state update Weak Parent Replacement


In a steady state update, new individuals
are inserted in the population as soon as In weak parent replacement, a weaker
they are created, as opposed to the parent is replaced by a strong child.
generational update where an entire new
generation is produced at each time step.
With the four individuals only the fittest
The insertion of a new individual usually
two, parent or child, return to population.
necessitates the replacement of another
population member. The individual to be
deleted can be chosen as the worst
member of the population.
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Search Termination
Both Parents Replacement
(Convergence Criteria)
Both parents replacement is simple. The child Stall generations–The algorithm stops if
replaces the parent. In this case, each there is no improvement in the objective
individual only gets to breed once. As a function for a sequence of consecutive
result, the population and genetic material generations of length Stall generations.
moves around but leads to a problem when Stall time limit–The algorithm stops if
combined with a selection technique that there is no improvement in the objective
strongly favors fit parents: the fit breed and function during an interval of time in
then are disposed of. seconds equal to Stall time limit.

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Search Termination
Stopping condition for GA flow
(Convergence Criteria)
 Maximum generations–The genetic algorithm stops when  Best Individual: A best individual convergence criterion
the specified number of generation’s have evolved. stops the search once the minimum fitness in the
population drops below the convergence value. This brings
 Elapsed time–The genetic process will end when a the search to a faster conclusion guaranteeing at least one
specified time has elapsed. good solution.
Note: If the maximum number of generation has been  Worst individual: Worst individual terminates the search
reached before the specified time has elapsed, the process when the least fit individuals in the population have fitness
will end. less than the convergence criteria. This guarantees the
 No change in fitness–The genetic process will end if there entire population to be of minimum standard, although the
best individual may not be significantly better than the
is no change to the population’s best fitness for a specified worst. In this case, a stringent convergence value may
number of generations. never be met, in which case the search will terminate after
the maximum has been exceeded.

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Stopping condition for GA flow Why do Genetic Algorithms Work?
It should be noted that particularly good
 Sum of Fitness: In this termination scheme, the schemata will propagate in future generations.
search is considered to have satisfaction Thus, schema that are low-order, well defined
converged when the sum of the fitness in the and have above average fitness are preferred
entire population is less than or equal to the and are termed building blocks.
convergence value in the population record. This leads to a building block principle of GA: low
order, well-defined, average fitness schemata
 Median Fitness: Here at least half of the will combine through crossover to form high
individuals will be better than or equal to the order, above average fitness schemata.
convergence value, which should give a good range Since GAs process may schemata in a given
of solutions to choose from. generation they are said to have the property of
implicit parallelism.
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Why do Genetic Algorithms Work? Genetic Algorithm – An Example


The search heuristics of GA are based upon  Simple problem: max x2 over {0, 1, …, 31}
Holland’s scheme theorem.
 GA approach:
A schema is defined as templates for describing a • Representation: binary code, e.g. 01101  13
subset of chromosomes with similar sections. • Population size: 4
The schemata consist of bits 0, 1 and meta- • 1-point xover, bitwise mutation
character. • Roulette wheel selection
• Random initialisation
The template is a suitable way of describing
similarities among Patterns in the  One generational cycle performed manually is shown here.
chromosomes Holland derived an expression
that predicts the number of copies of a
particular schema would have in the next
generation after undergoing exploitation,
crossover and mutation.
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Example : Selection Example : Mutation

4 1
31% 14%

5% 3
49%
2
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

Example : Crossover Simple Genetic Algorithm


 Has been subject of many (early) studies

• still often used as benchmark for novel Gas.

 Shows many shortcomings, e.g.

• Representation is too restrictive.


• Mutation & crossovers only applicable for bit-string & integer
representations.
• Selection mechanism sensitive for converging populations with
close fitness values.

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
Comparison of GA with Traditional Optimization Online Resources
Techniques
 http://www.spectroscopynow.com
 GA works with the coding of solution set and not with the solution
itself.  http://www.cs.bris.ac.uk/~colin/evollect1/evollect0/index.htm\

 GA uses population of solutions rather than a single solution for  IlliGAL (http://www-illigal.ge.uiuc.edu/index.php3)
searching.
 GAlib (http://lancet.mit.edu/ga/)
 GA uses fitness function for evaluation rather the derivatives.

 GA uses probabilistic transition and not deterministic rules.

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam

References
 Holland, J. (1992), Adaptation in natural and artificial systems ,
2nd Ed. Cambridge: MIT Press.

 Davis, L. (Ed.) (1991), Handbook of genetic algorithms. New York:


Van Nostrand Reinhold.

 Goldberg, D. (1989), Genetic algorithms in search, optimization


HYBRID SOFT
and machine learning. Addison-Wesley.
COMPUTING
 Fogel, D. (1995), Evolutionary computation: Towards a new
philosophy of machine intelligence. Piscataway: IEEE Press. TECHNIQUES
 Bäck, T., Hammel, U., and Schwefel, H. (1997), ‘Evolutionary
computation: Comments on the history and the current state’, IEEE
Trans. On Evol. Comp. 1, (1)
Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
GENERAL NEURO HYBRID SYSTEMS
ADVANTAGES OF GENETIC NEURO HYBRID
Definition:
A neuro-genetic hybrid or a genetic_neuro-hybrid system is one in which a SYSTEMS
neural network employs a genetic algorithm to optimize its structural
parameters that define its architecture. The various advantages of neuro-genetic hybrid are as follows:

Properties of genetic neuro-hybrid systems:  GA performs optimization of neural network parameters with simplicity,
1. The parameters of neural networks are encoded by genetic algorithms as a ease of operation, minimal requirements and global perspective.
string of properties of the network, that is, chromosomes. A large
population of chromosomes is generated, which represent the many  GA helps to find out complex structure of ANN for given input and the
possible parameter sets for the given neural network. output data set by using its learning rule as a fitness function.

2. Genetic Algorithm _Neural Network, or GANN, has the ability to locate the  Hybrid approach ensembles a powerful model that could significantly
neighborhood of the optimal solution quickly, compared to other improve the predictability of the system under construction.
conventional search strategies.

Drawbacks are :
1. Large amount of memory required for handling and manipulation of
chromosomes for a given network
2. Scalability as the network becomes large
Arsha J K,AP,Computer Science and
Arsha J K,AP,Computer Science and
Engineering, VJCET, Vazhakulam
Engineering, VJCET, Vazhakulam

BLOCK DIAGRAM OF GENETIC NEURO HYBRID GENETIC FUZZY HYBRID SYSTEMS


SYSTEMS
The hybridization of genetic algorithm and fuzzy logic can be performed in the
following two ways:

1. By the use of fuzzy logic based techniques for improving genetic algorithm
behavior and modeling GA components. This is called fuzzy genetic algorithms
(FGAs).

2. By the application of genetic algorithms in various optimization and search


problems involving fuzzy systems.

Fig 3

Arsha J K,AP,Computer Science and Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam Engineering, VJCET, Vazhakulam
ADVANTAGES OF GENETIC FUZZY HYBRID
SYSTEMS
GAs allow us to represent different kinds of structures, such as weights,
features together with rule parameters, etc., allowing us to code multiple
models of knowledge representation. This provides a wide variety of
approaches where it is necessary to design specific genetic components for
evolving a specific representation.

Genetic algorithm efficiently optimizes the rules, membership functions, DB and


KB of fuzzy systems. The methodology adopted is simple and the fittest
individual is identified during the process.

Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam

SUMMARY
This chapter has given an overview on Hybrid Soft Computing Techniques

Arsha J K,AP,Computer Science and


Engineering, VJCET, Vazhakulam

You might also like