A Simple Genetic Algorithm
The mechanics of easy genetic algorithm are surprisingly simple, including nothing more complex than copying strings and swapping partial strings. A solution to a specified problem is represented in the form of a string, named as: 'chromosome', consisting of a set of elements named as 'genes' that hold a set of values for the optimization variables. Genetic algorithm works along with a random population of solutions. The fitness of all chromosomes is found by evaluating this against an objective function. To simulate the natural survival of the fittest process, best chromosomes exchange information through mutation and crossover to produce offspring chromosomes. The offspring solutions are then evaluated and utilized to evolve the population if they offer better solutions than weak population members. Mostly, the process is continued for a large number of generations to obtain a best-fit or near-optimum solution. Assume P (t) and C (t) be parents and offspring in current generation t; the common structure of genetic algorithm is explained in Programme 1.
Begin
t ←0;
initialize P(t);
evaluation P(t);
While (not termination condition) do
recombine P(t) to yield C(t);
evaluation C(t)
Select P(t+1) from P(t) and C(t);
t ← t+1;
End
End
Programme 1 of: General Structure of Genetic Algorithm
The two class of operations that happen in genetic algorithm are as:
Genetic Operations
Mutation and Crossover
Evolution Operation
Selection