Module 6-1
Module 6-1
APPLICATIONS OF
GENETIC ALGORITHMS
Genetic Genetic
Programming Algorithms
problem definition.
0
GAs are used to search the search 0 100 200 300 400 500 600 700 800 900 1000
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
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
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
Tournament Selection
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
PARENT 1 11010001
PARENT 2 01101001
PARENT 3 01101100
CHILD 01101001
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
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.
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
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.
References
Holland, J. (1992), Adaptation in natural and artificial systems ,
2nd Ed. Cambridge: MIT Press.
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
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).
Fig 3
SUMMARY
This chapter has given an overview on Hybrid Soft Computing Techniques