# Genetic algorithm: fitness proportionate selection using RMSD as fitness function?

I'm implementing a genetic algorithm to optimise $$x$$ so as to minimise the RMSD error $$r(x)$$ between my model and experimental data.

During the selection stage of recombination, I wish to select 'chromosomes' for breeding using fitness proportionate selection. This means that each chromosome $$x$$ is selected with a probability that is proportional to some fitness function $$f(x)$$. Clearly, $$f$$ should be large for good fits and small for bad fits, which is the inverse behaviour of the RMSD function $$r(x)$$.

So my question is: What is the standard way of constructing $$f(x)$$ from $$r(x)$$?

One obvious solution would be $$f(x)=1/r(x)$$ but I'm concerned that if $$r$$ is small enough then $$f$$ may be enormous which could harm genetic diversity.

My usual answer is "don't use fitness proportionate selection". If you want to use it though, you kind of have to enter the world of tuning things to get the level of selection pressure you want. You could, instead of $$1/r(x)$$, do $$(k+1)/(k+r(x))$$ for some problem-specific value of $$k$$. That'll scale things to some degree. You could apply some non-linear scale to the values to bring the outliers closer to the median. I'm sure you can come up with ways to screw around with some ad hoc manipulations with no grounding in theory that would more or less work.