I'm writing genetic program, but it's been a while so I'm a little rusty.
If I start with a population size of 100 individuals, and select 50 through tournament selection for reproduction, and after crossover each pair produces 50 next-generation individuals, I'm left with 100 1st-gen individuals (which will no longer reproduce, no longer part of the "population") and 50 current-gen individuals. So my tournament selection of 50 won't really work. Should the tournament selected individuals also go on to the next generation? Or should they reproduce 2:1 somehow?
Thanks for the refresher!
There are many ways to perform selection and crossover in a Genetic Algorithm but generally, if you're using tournament selection you're best to select as many individuals as your population and have them produce the same number of offspring.
There are a number of ways to produce the same number of offspring as parents but, as an example, if performing a straight forward one point crossover each half of the initial parent would carry forward with the other half of the other parent. That way two parents produce two offspring. For example
Parent 1: 00000000
Parent 2: 11111111
With a crossover point after the third bit.
Offspring 1: 00011111
Offspring 2: 11100000
Afterwards you can discard your entire initial population and replace them with all the offspring.
Note: This doesn't take into account any specialised operator you may want to include which can help to carry the best individuals forward every population. But that's another story....