Genetic Algorithm in Artificial Intelligence
A genetic algorithm is an adaptive algorithm inspired by “Darwin theory of evolution”. It solves problems in machine learning in a more optimized manner and greatly reduces the time taken to solve complex problems.
WHAT IS GENETIC ALGORITHM?
We can define genetic algorithm as a heuristic search algorithm that solves complex problems in a more optimized manner. It uses concepts such as genetic and natural selection to solve the optimization difficulty.
HOW DOES IT WORK?
It works in an evolving cycle to generate high-quality results. This cycle or algorithm works in an iterative format that either enhances the population or replaces it to provide a more improved fit result.
It consists of 5 steps that solves the complex optimization problems:
The process starts with the generation of a set of individuals that are referred to as population. It contains a set of parameters that are called genes which are then combined into a string to generate chromosomes. These chromosomes are the result to the problems that are derived by random binary strings method.
- Fitness assignment:
The fitness function determines the ability of an individual to compete with other individuals. In every cycle, individuals are evaluated based on their fitness function. This function assigns a score to each individual that determines the probability of being selected for reproduction. The higher the fitness score, the more chances of getting selected for reproduction.
All the selected individuals are then arranged in a pair of two to increase reproduction of offspring. Then they transfer their genes to the next generation. The selection can be done by
- Roulette wheel selection
- Tournament selection
- Rank-based selection
After selection, the creation of a child occurs in the reproduction step. In this step we use two different operators that are applied to the parent:
The last step is terminating the reproduction phase by applying a stopping criterion. The cycle terminates after a threshold fitness solution is reached. It will consider the final solution as the best solution in the population.
ADVANTAGES OF GENETIC ALGORITHM
- The multitasking abilities of genetic algorithms.
- It helps with discrete functions, continuous functions, and multi-objective problems.
- With time the solution improves to a great extent
- No derivative information
DISADVANTAGES OF GENETIC ALGORITHM
- Not efficient for simple problems.
- Cannot ensure the quality on the result.
Genetic AI shows us a different way to tackle optimization problems and model development in machine learning. By using the theory of evolution, we are striving for even greater heights in efficiency and optimization. And this is going to grow gradually with the advancement of computational power.