Genetic algorithms are a type of evolutionary algorithm that mimics natural selection. They operate on a population of potential solutions applying operators like selection, crossover and mutation to produce the next generation. The algorithm iterates until a termination condition is met, such as a solution being found or a maximum number of generations being produced. Genetic algorithms are useful for optimization and search problems as they can handle large, complex search spaces. However, they require properly defining the fitness function and tuning various parameters like population size, mutation rate and crossover rate.
2. Maxima and Minima from Calculus
•Great powers of calculus is in the determination of the
maximum or minimum value of a function.
•Take f(x) to be a function of x. Then the value of x for
which the derivative of f(x) with respect to x is equal
to zero corresponds to a maximum, a minimum or an
inflexion point of the function f(x).
3. • The height of a projectile that is fired straight up is given by the
motion equations
4.
5.
6.
7. Classes of Search Techniques
Finonacci Newton
Direct methods Indirect methods
Calculus-based techniques
Evolutionarystrategies
Centralized Distributed
Parallel
Steady-state Generational
Sequential
Genetic algorithms
Evolutionary algorithms Simulated annealing
Guided random search techniques
Dynamic programming
Enumerative techniques
Search techniques
8. Genetic Algorithms is the most
commonly used prominent
computational algorithm introduced by
I. Rechenberg in 1960’s and developed
by John Holland in 1975. This
evolutionary algorithm mimics the
Darwin’s theory of evolution by natural
selection for problem solving.
10. Simple Genetic Algorithm
{
initialize population;
evaluate population;
while Termination Criteria Not Satisfied
{
select parents for reproduction;
perform crossover and mutation;
evaluate population;
}
}
11. The GA Cycle of Reproduction
reproduction
population evaluation
modification
discard
deleted
members
parents
children
modified
children
evaluated children
12. Population
Chromosomes could be:
• Bit strings (0101 ... 1100)
• Real numbers (43.2 -33.1 ... 0.0 89.2)
• Permutations of element (E11 E3 E7 ... E1 E15)
• Lists of rules (R1 R2 R3 ... R22 R23)
• Program elements (genetic programming)
• ... any data structure ...
population
13. Population Size
Population size depicts the number of
chromosomes in one generation. If the population
size is very small, then only a small part of the
search space is explored. Whereas, if the
population size is too large then a very large part of
the search space is explored and due to obvious
reasons the algorithm slows down.
14. Selection
• Best chromosomes are selected from the population to form the
parents for next generation
• The different selection methods for choosing the best chromosomes
are
(i) Roulette Wheel Selection,
(ii) Tournament Selection,
(iii) Rank Selection,
(iv) Boltzman Selection,
(v) Steady-State Selection, etc.
15. Roulette Wheel Selection
Better chromosomes have high probability to be selected as new
parents. The probability of each individual chromosome getting
selected is given by the equation.
𝑃𝑖 =
𝑓 𝑖
𝑗=1
𝑁 𝑓 𝑖
where,
fi is the fitness of the individual i in the population
N is the number of individuals in the population
23. Arithmetic Crossover
Crossover is a critical feature of genetic algorithms:
•It greatly accelerates search early in evolution of a
population
•It leads to effective combination of schemata
(subsolutions on different chromosomes)
26. Mutation: Local Modification
Before: (1 0 1 1 0 1 1 0)
After: (0 1 1 0 0 1 1 0)
Before: (1.38 -69.4 326.44 0.1)
After: (1.38 -67.5 326.44 0.1)
• Causes movement in the search space
(local or global)
• Restores lost information to the population
27.
28. Exploration: Discovering promising areas in the search space, i.e.
gaining information on the problem
Exploitation: Optimising within a promising area, i.e. using
information
There is co-operation and competition between them
• Crossover is explorative, it makes a big jump to an area
somewhere “in between” two (parent) areas
• Mutation is exploitative, it creates random small diversions,
thereby staying near (in the area of ) the parent
Crossover OR mutation?
29. • Only crossover can combine information from two parents
• Only mutation can introduce new information (alleles)
• Crossover does not change the allele frequencies of the
population
• To hit the optimum you often need a ‘lucky’ mutation
Crossover OR mutation?
30. Evaluation
• The evaluator decodes a chromosome and assigns it a fitness
measure
• The evaluator is the only link between a classical GA and the problem
it is solving
evaluation
evaluated
children
modified
children
31.
32.
33. Deletion
• Generational GA:
entire populations replaced with each iteration
• Steady-state GA:
a few members replaced each generation
population
discard
discarded members
34.
35. Termination
This evolutionary process is continued until the
termination condition is satisfied. The termination
conditions may be:
• Reaching the maximum number of generations
• Successive iteration does not provide proper results
• An optimal fitness value of the population is reached.
42. Consider the problem of maximizing the function,
f(x) = x2
Where x is permitted to vary between 0 to 31.
(i) 0(00000) and 31(11111) code x into finite
length string
(ii) Select initial population at random (size 4)
(iii) Calculate fitness value for all strings
(iv) probability of selection by:
𝑃𝑟𝑜𝑏𝑖=
𝑓(𝑥) 𝑖
𝑖=1
𝑛
𝑓(𝑥) 𝑖
,
50. Advantages of Genetic Algorithm
Parallelism, robustness and liability
Solution space is wider
Handles large, poorly understood search spaces easily
Easily modified for different problems
Easy to discover global optimum
Handles noisy functions as well
Only uses function evaluations
They require no information about the response surface
Perform very well for large-scale optimization problems
Can be employed for a wide variety of optimization problems
The problem has multi objective function
Very robust to difficulties in the evaluation of the objective function
51. Limitations of Genetic Algorithm
The problem of identifying fitness function
Requires large number of fitness function evaluations
The problem of choosing the various parameters like
the size of the population, mutation rate, crossover
rate, the selection method and its strength.
Definition of representation of the problem
No effective terminator
Needs to be coupled with a local search technique
Have trouble finding the exact global optimum