Genetic algorithms:
1. Genetic algorithms are based on the ideas of natural selection and genetics.
2. They are commonly used to generate high-quality solutions for optimization problems and
search problems.
3. Genetic algorithms simulate the process of natural selection which means those species that can
adapt to changes in their environment can survive and reproduce and go to the next generation.
4. In simple words, they simulate “survival of the fittest” among individuals of consecutive
generations to solve a problem.
5. Each generation consists of a population of individuals and each individual represents a point
in search space and possible solution.
6. Each individual is represented as a string of character/integer/float/bits.
7. This string is analogous to the Chromosome.
8. Genetic algorithms are based on an analogy with the genetic structure and behavior of
chromosomes of the population.
9. Following is the foundation of GAs based on this analogy –
1. Individuals in the population compete for resources and mate
2. Those individuals who are successful (fittest) then mate to create more
offspring than others.
3. Genes from the “fittest” parent propagate throughout the generation, that
is sometimes parents create offspring which is better than either parent.
4. Thus each successive generation is more suited for their environment.
10. The population of individuals are maintained within search space.
11. Each individual represents a solution in search space for given problem.
12. Each individual is coded as a finite length vector (analogous to chromosome) of components.
13. These variable components are analogous to Genes. Thus a chromosome (individual) is
composed of several genes (variable components).
14. A Fitness Score is given to each individual which shows the ability of an individual to
“compete”.
15. The GAs maintains the population of n individuals (chromosome/solutions) along with their
fitness scores.
16. The individuals having better fitness scores are given more chance to reproduce than others.
17. The individuals with better fitness scores are selected who mate and produce better
offspring by combining chromosomes of parents.
18. each new generations have better “partial solutions” than previous generations.
19. Once the offspring produced having no significant difference from offspring produced by
previous populations, the population is converged.
20. The algorithm is said to be converged to a set of solutions for the problem.
Operators of Genetic Algorithms
Once the initial generation is created, the algorithm evolves the generation using
following operators –
1) Selection Operator: The idea is to give preference to the individuals with good fitness scores
and allow them to pass their genes to successive
generations.
2) Crossover Operator: This represents mating between individuals. Two individuals are
selected using selection operator and crossover sites are chosen randomly. Then the genes at
these crossover sites are exchanged thus creating a completely new individual (offspring).
For example –
3) Mutation Operator: The key idea is to insert random genes in offspring to maintain the
diversity in the population to avoid premature convergence. For example –
Algorithm
1) Randomly initialize populations p
2) Determine fitness of population
3) Until convergence repeat:
a) Select parents from population
b) Crossover and generate new population
c) Perform mutation on new population
d) Calculate fitness for new population
Advantages of Algorithms:
1. It is a step-wise representation of a solution to a given problem, which makes it easy
to understand.
2. An algorithm uses a definite procedure.
3. It is not dependent on any programming language, so it is easy to understand for
anyone even without programming knowledge.
4. Every step in an algorithm has its own logical sequence so it is easy to debug.
5. By using algorithm, the problem is broken down into smaller pieces or steps hence, it
is easier for programmer to convert it into an actual program.
Disadvantages of Algorithms:
1. Algorithms is Time consuming.
2. Difficult to show Branching and Looping in Algorithms.
3. Big tasks are difficult to put in Algorithms.
Application of Genetic Algorithms
Genetic algorithms have many applications, some of them are –
Recurrent Neural Network
Mutation testing
Code breaking
Filtering and signal processing
Learning fuzzy rule base etc