Unit4-GeneticAlgorithm
Unit4-GeneticAlgorithm
What is a Genetic
Algorithm?
Before understanding the Genetic algorithm, let's first understand basic
terminologies to better understand this algorithm:
o Initialization
o Fitness Assignment
o Selection
o Reproduction
o Termination
1. Initialization
The process of a genetic algorithm starts by generating the set of
individuals, which is called population. Here each individual is the solution
for the given problem. An individual contains or is characterized by a set
of parameters called Genes. Genes are combined into a string and
generate chromosomes, which is the solution to the problem. One of the
most popular techniques for initialization is the use of random binary
strings.
2. Fitness Assignment
Fitness function is used to determine how fit an individual is? It means the
ability of an individual to compete with other individuals. In every
iteration, individuals are evaluated based on their fitness function. The
fitness function provides a fitness score to each individual. This score
further determines the probability of being selected for reproduction. The
high the fitness score, the more chances of getting selected for
reproduction.
3. Selection
The selection phase involves the selection of individuals for the
reproduction of offspring. All the selected individuals are then arranged in
a pair of two to increase reproduction. Then these individuals transfer
their genes to the next generation.
4. Reproduction
After the selection process, the creation of a child occurs in the
reproduction step. In this step, the genetic algorithm uses two variation
operators that are applied to the parent population. The two operators
involved in the reproduction phase are given below:
5. Termination
After the reproduction phase, a stopping criterion is applied as a base for
termination. The algorithm terminates after the threshold fitness solution
is reached. It will identify the final solution as the best solution in the
population.