Here is my (mis?)understanding of genetic algorithm:
- Create n individuals. This is initial population
- Calculate fitness of each individual in this population
for i in range(n): select two individuals randomly with replacement from population with probability of selection of each individual proportional to its fitness value cross over the two selected individuals to create two offsprings introduce mutation
- Calculate fitness value for each offspring
Now you have an initial population of n and n offsprings.
What comes now?
Is my new population the n offsprings or the n fittest individuals of the 2n (n population + n offsprings) available?