Genetic algorithm selection and crossover questions

477 views Asked by At

I have been using my own GA for a while where I use random selection and elitism (top 10% or so) to get 50% of my population. I then do crossover to produce the next 50%, followed by mutation of course. It sounds strange, but it has gotten me far enough in my problem to be satisfied with it for now.

I'd like to start using more elaborate selection methods, specifically ranked selection. I'd also like to employ a crossover probability.

My questions are:

  1. When doing ranked selection, is each individual only allowed to be selected once?
  2. What typically happens to the parents after crossover? Do they get replaced by children or do they also go onto the next generation?
1

There are 1 answers

2
zegkljan On BEST ANSWER
  1. When doing ranked selection, is each individual only allowed to be selected once?

Well, if every individual was allowed to be selected only once, you would have to copy the whole population to form the new one. In ranked selection you just pick probabilistically with probability proportional to the rank of the individual and let the chance decide whether or which individual gets copied more times.

  1. What typically happens to the parents after crossover? Do they get replaced by children or do they also go onto the next generation?

It depends. If you have a so-called generational scheme, you always generate a whole new population that replaces the old one completely. The members of this new population are from these four "sources":

  • Elites copied directly from the parent population.
  • Individuals selected from the parent population which were neither crossed over nor mutated (i.e. copied directly too).
  • Children of parents that were selected from the parent population which were crossed over but not mutated.
  • Mutated children of parents that were selected from the parent population and crossed over.

On the other hand, you can have a so-called steady state scheme. In this scheme, in each iteration you select just enough individuals to be able to perform crossover, cross them over (if probability allows), mutate them (if probability allows) and then you somehow put them back into the original population. That means that someone must get thrown away. This may be the parents or the children (if one is worse than the other) or an arbitrary member of the population based on your replacement strategy. You can do e.g. "inversed" selection, i.e. selection with probabilites the other way around (the worst gets the highest while the best gets the lowest).

One final remark - in the realm of GAs, almost any mechanism you come up with may work for your particular problem, or it may not. You just have to try. It's a stochastic method after all.