- Log into linkreferral
- search for sites from your favorite category.
- visit 30 sites, review 5 of them, post 1 forum, add 1 to favorites
- It's done
Try this, a really good one....
If u work for a living,why do u kill urself, workin???
Source: Economictimes
Source: Economictimes
INTRODUCTION:
Genetic algorithms are computerized search and optimization algorithm based on the mechanics of natural genetics and natural selection. Professor John Holland of the
Step 1:
Choose a coding o represent problem parameters, a selection operator, a crossover operator, and a mutation operator. Choose population size, n, crossover probability, and mutation probability, . Initialize a random population of strings of size. Choose a maximum allowable generation number tmax. Set t=0.
To know about choosing GA parameters Click here
Step 2:
Evaluate each string in the population.
To know about evaluation Click here
Step 3:
If no of generations is exceeded or other termination criteria are satisfied, terminate.
Step 4:
Perform reproduction on the population.
Step 5:
Perform crossover on random pairs of strings.
To know about cross over, Click here
Step 6:
Perform mutation on every string.
To know about mutation, Click here
In reproduction, good strings in a population are probabilistically assigned a large number of copies and a mating pool is formed. It is important to note that no new strings are formed in the reproduction phase. In the crossover operator, new strings are created by exchanging information among he strings of the matting pool. Many crossover operators exist in GA literature. In most crossover operators, two strings are picked from the matting pool at random and some portions of the strings are exchanged between the strings. A single-point crossover operator is performed by randomly choosing a crossing site along the string and by exchanging all bits on the right side of the crossing site as shown:
0 0 | 0 0 0 0 0 | 1 1 1
1 1 | 1 1 1 1 1 | 0 0 0
These two strings participating in the crossover operation are known as parent strings and the resulting strings are known as children strings. It is intuitive from this construction that good substrings from parent strings can be combined to form a better child string, if an appropriate site is chosen. Since the knowledge of an appropriate site is usually not known beforehand, a random site is often chosen. With a random site, the children strings produced may or may not have a combination of good substrings from he parent strings, depending on whether or not the crossing site falls in the appropriate place. But we don’t worry about this too much, because if good strings are created by crossover, there will be more copies of them in the next mating pool generated by the reproduction operator. But if good strings are not created by crossover, they will not survive too long, because reproduction will select against those strings in subsequent generation.
It is clear from this discussion that the effect of crossover may be detrimental or beneficial. Thus, in order to preserve some of the good strings that are already present in the mating pool, not all strings in the mating pool are used in crossover. When a crossover probability of is used, only 100 percent strings in the population are used in the crossover operation and 100(1-) percent of the population remains as hey are in the current population.
|
|