Open In App

Encoding Methods in Genetic Algorithm

Biological Background :

Chromosome: All living organisms consist of cells. In each cell, there is the same set of Chromosomes. Chromosomes are strings of DNA and consist of genes, blocks of DNA. Each gene encodes a trait, for example, the color of the eye. 
Reproduction: During reproduction, combination (or crossover) occurs first. Genes from parents combine to form a whole new chromosome. The newly created offspring can then be mutated. The changes are mainly caused by errors in copying genes from parents. The fitness of an organism is measured by the success of the organism in its life. 

Operation of Genetic Algorithms : 
Two important elements required for any problem before a genetic algorithm can be used for a solution are 



Basic principles :

Algorithmic Phases : 



Simple_Genetic_Algorithm()
{
     Initialize the population;
     Calculate Fitness Function;

     while(Fitness Value != Optimal Value)
     {
          Selection;  //Natural Selection, survival of fittest
          Crossover;  //Reproduction, propagate favorable characteristics
          Mutation;
          Calculate Fitness Function;
      }
}

Encoding using string : 
Encoding of chromosomes is the first step in solving the problem and it depends entirely on the problem heavily. The process of representing the solution in the form of a string of bits that conveys the necessary information. just as in a chromosome, each gene controls particular characteristics of the individual, similarly, each bit in the string represents characteristics of the solution. 

Encoding Methods : 

Article Tags :