Genetic Algorithm
Genetic Algorithm
1. Initial population
2. Fitness function
3. Selection
4. Crossover
5. Mutation
Initial Population
The process begins with a set of individuals which is called
a Population. Each individual is a solution to the problem you want to
solve.
Fitness Function
The fitness function determines how fit an individual is (the ability of an
individual to compete with other individuals). It gives a fitness score to
each individual. The probability that an individual will be selected for
reproduction is based on its fitness score.
Selection
The idea of selection phase is to select the fittest individuals and let them
pass their genes to the next generation.
Crossover point
New offspring
Mutation
In certain new offspring formed, some of their genes can be subjected to
a mutation with a low random probability. This implies that some of the
bits in the bit string can be flipped.
Termination
The algorithm terminates if the population has converged (does not
produce offspring which are significantly different from the previous
generation). Then it is said that the genetic algorithm has provided a set
of solutions to our problem.