Anda di halaman 1dari 14

# Simple Genetic Algorithms

Hollands genetic algorithms is commonly called as the Simple Genetic Algorithms. (SGA) General features of GA: Used to solve problems where traditional search and optimize methods are less effective. Survival of the fittest concept is emulated in a computer making a fittest test for data. The data passes through a fitness test and acquire a score. Only the data with top scores survive in the next generation.

## SGA: Uses non-overlapping populations.

In each generation it creates an entirely new population of individuals. Population of binary string. Each string of 0s and 1s is the encoded version of a solution to the optimization problem. Using genetic operators-crossover and mutation, the algorithm creates the subsequent generation from the strings of the current population

This generation cycle is repeated until a desired termination criterion is reached. Working of the SGA: Population of binary strings Control parameters Fitness function Genetic operators A selection mechanism A mechanism to encode the solutions as binary strings

Genetic Algorithms
Genetic Algorithms methods are rooted in the mechanisms of evolution and natural genetics Genetic Algorithms generate a sequence of populations by using a selection mechanism and use crossover and mutations.

Evolutionary strategies use mutations as search mechanisms and selection to direct the search towards the prospective regions in the search space.
The principal difference between evolutionary strategies and genetic algorithms is that genetic algorithms rely on crossover, a mechanism of probabilistic and useful exchange of information among solutions, to locate better solutions, while evolutionary strategies use mutation as the primary search mechanism. In nature, individuals best suited to competition for scanty resources survive.

Adapting to changing environment is essential for the survival of each species. While the various features that uniquely characterize an individual determine its survival capacity, the features in turn are determined by the individual genetic contents.
Specifically, each feature is controlled by a basic unit called a gene. The sets of genes controlling features form the chromosome, the keys to the survival of individual in a competitive environment.

1 1

0 0

0 0

0 0

1 1

0 1

1 0

0 1

1 1

1 1

1 1

0 1

1 0

0 0

1 0

Although evolution manifests itself as success of changes in species features , it is the changes in the species genetic material that form the essence of evolution. Specifically, evolutions driving force is the joint action of natural selection and the recombination of genetic material that occurs during reproduction. Only the fittest individuals survive and reproduce, a natural phenomenon called the survival of the fittest. Hence the genes of the fittest survive, while the genes of weaker individuals die out

Natural selection leads to the survival of the fittest genes. The reproduction process generates diversity in the gene pool. The exchange of genetic material among chromosomes is called crossover, creating the possibility of the right combination of genes for better individuals. Repeated selection and crossover cause the continuous evolution of the gene pool and the generation of the individuals that survive better in a competitive environment.

Holland proposed genetic algorithms as computer programs that mimic the evolutionary process in nature.

## Genetic algorithms manipulate a population of potential solutions to an optimization problems

They operate on encoded representations of solutions, equivalent to the genetic material of individuals in nature.
The solutions are encoded as strings of bits from binary alphabet.

As in nature selection provides the necessary driving mechanism for better solutions in the population.
Roulette Wheel selection Choosing members from the population of chromosomes in a way that is proportional to their fitness. It does not guarantee that the fittest member goes through to the next generation, Imagine that the populations total fitness score is represented by a pie chart, or roulette wheel Assign a slice of the wheel to each member of the population. The size of the slice is proportional to that chromosomes fitness score Now, to choose a chromosome all you have to do is spin the ball and grab the chromosome at the point it stops

Higher the fitness value of an individual the higher its chances of survival and reproduction and the larger its representation in the subsequent generation. Recombination of genetic material in genetic algorithm is simulated through a crossover mechanism that exchanges portions between strings This is simply the chance that two chromosomes will swap their bits. A good value for this is around 0.7. Crossover is performed by selecting a random gene along the length of the chromosomes and swapping all the genes after that point. E.g. Given two chromosomes 10001001110010010 01010001001000011

Mutation This is the chance that a bit within a chromosome will be flipped (0 becomes 1, 1 becomes 0). This is usually a very low value for binary encoded genes, say 0.001 So whenever chromosomes are chosen from the population the algorithm first checks to see if crossover should be applied and then the algorithm iterates down the length of each chromosome mutating the bits if applicable.

Start

N
Selection

Best individual

Crossover

Stop

Mutation
Generate Next