Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to perform rank based selection in a genetic algorithm?

I am implementing a small genetic algorithm framework - primarily for private use, unless I manage to make something reasonable at which time I will post it as open source. Right now I am focusing on selection techniques. So far I have implemented roulette wheel selection, stochastic universal sampling and tournament selection. Next on my list is rank based selection. I had a little more difficulty finding information about that than the other techniques that I've already implemented, but here is my understanding so far.

  1. When you have your population from which you want to get reasonable parents for the next round, you first go through it and divide the fitness of each individual by the total fitness in the population.

  2. Then you use some other selection technique (such as roulette wheel) to actually determine whom to select for breeding.

Is this correct? If so, am I right in thinking that the rank adjustment is a sort of preprocessing step which then has to be followed by an actual selection procedure that picks out the candidates? Please correct me if I have misunderstood any of this. I am grateful for any additional pointers.

like image 317
Philip Bennefall Avatar asked Nov 29 '13 17:11

Philip Bennefall


People also ask

What is rank based selection in genetic algorithm?

Rank Selection. Rank Selection sorts the population first according to fitness value and ranks them. Then every chromosome is allocated selection probability with respect to its rank [23]. Individuals are selected as per their selection probability. Rank selection is an explorative technique of selection.

How is selection probability calculated in genetic algorithm?

1) Initiate the population of genes 2) Calculate the fitness of each individual in the population 3) Reproduce the individual selected to form a new population according to each individual's fitness 4) Perform crossover and mutation on the population 5) Repeat step (2) through (4) until some condition is statisfied.

What are the parent selection mechanism in EA?

Parent selection mechanism. The purpose of the parent selection mechanism is to determine a subset of individuals from the offspring chromosomes, survived in the previous generation, that will participate in the EA operations and generate the new offspring chromosomes.


1 Answers

What you've described there is roulette wheel selection, not rank selection. To do rank selection, rather than weighting each candidate by its fitness score, you weight it by its "rank" (that is, best, second best, third best, etc.).

For instance, you might give the first one a weighting of 1/2, the second a weighting of 1/3, the third a weighting of 1/4, etc. Or the worst gets weighting 1, the second worst gets weighting 2, etc.

The important point is that absolute or relative fitness scores are not considered, only the rankings. So the best is more likely to be chosen than the second best, but the two have the same probabilities of being chosen whether the best had ten times the score of the second best, or only had a slightly greater score.

like image 160
Sneftel Avatar answered Sep 19 '22 15:09

Sneftel