Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Roulette wheel selection for function minimization

This question answers pseudocode for roulette wheel selection. But it's for maximization problem. But my problem is to minimize the value of fitness function. That means, individuals with low fitness get higher probability for being selected than individual with high fitness. How can I implement that?

Thanks in advance.

like image 697
Masud Hasan Avatar asked Jan 06 '12 15:01

Masud Hasan


People also ask

How is rank selection better than the roulette wheel selection method?

Rank selection is easy to implement when you already know on roulette wheel selection. Instead of using the fitness as probability for getting selected you use the rank. So for a population of N solutions the best solution gets rank N, the second best rank N-1, etc. The worst individual has rank 1.

How do you work out proportionate selection?

A better approach to selection is to give every individual a chance of being selected to breed but to make fitter candidates more likely to be chosen than weaker individuals. This is achieved by making an individual's survival probability a function of its fitness score.


2 Answers

Use the same algorithm but make the proportion of each individual = maxfitness - fitness

like image 100
Larry OBrien Avatar answered Oct 07 '22 01:10

Larry OBrien


Change the fitness to fitness_new = 1 / fitness_old and you have maximization problem again. If fitness_old = 0 is possible, add 1 to the denominator to avoid division by zero.

like image 23
CGFoX Avatar answered Oct 07 '22 00:10

CGFoX