Professional Documents
Culture Documents
Algorithms
(GA)
RAJIB KUMAR SINHARAY, PHD
MIT-WORLD PEACE UNIVERSIT Y
PUNE, INDIA
Genetic Algorithm
A genetic algorithm is a search heuristic that is inspired by Charles Darwin’s
theory of natural evolution. This algorithm reflects the process of natural
selection where the fittest individuals are selected for reproduction in order to
produce offspring of the next generation.
Natural Selection
The process of natural selection starts with the selection of fittest individuals
from a population. They produce offspring which inherit the characteristics of
the parents and will be added to the next generation. If parents have better
fitness, their offspring will be better than parents and have a better chance at
surviving. This process keeps on iterating and at the end, a generation with
the fittest individuals will be found.
This notion can be applied for a search problem. We consider a set of
solutions for a problem and select the set of best ones out of them.
Chromosome Crossover
Evolution Rules
1. Initial population
2. Fitness function
3. Selection Process
4. Crossover of DNA
5. Mutation Process
Similarity of Process
Basics of GA
i. An individual is characterized by a set of parameters: Genes
ii. The genes are joined into a string: Chromosome
iii. The chromosome forms the genotype
iv. The genotype contains all information to construct an organism: the phenotype
v. Reproduction is a “dumb” process on the chromosome of the genotype
vi. Fitness is measured in the real world (‘struggle for life’) of the phenotype
1. Initial Population
❖ The process begins with a set of individuals which is called a Population
Two pairs of individuals (parents) are selected based on their fitness scores.
Individuals with high fitness have more chance to be selected for reproduction.
4. DNA Crossover
Offspring are created by exchanging the genes of parents among themselves until the
crossover point is reached. For each pair of parents to be mated, a crossover point is chosen
at random from within the genes.
Crossover Basics
❖ Two parents produce two offspring
❖ There is a chance that the chromosomes of the two parents are copied
unmodified as offspring
Based on their fitness, parents are selected to reproduce offspring for a new
generation
◦ Fitter individuals have more chance to reproduce
◦ New generation has same size as old generation; old generation dies
2. Fitness function
3. Parent selection
4. Reproduction
o Crossover
o Mutation
5. Convergence
o When to stop
Coding
I. Parameters of the solution (genes) are concatenated to form a string
(chromosome)
II. All kind of alphabets can be used for a chromosome (numbers, characters), but
generally a binary alphabet is used
III. Order of genes on chromosome can be important
IV. Generally many different codings for the parameters of a solution are possible
V. Good coding is probably the most important factor for the performance of a GA
VI. In many cases many possible chromosomes do not code for feasible solutions
Iterations and Errors
Reproduction Competition
Survive Selection
Continue….