The relative fitness of an individual is a simple function of the number of mutations the individual carries. The fitness procedure in the simulator is just a direct implementation of the corresponding function in the mathematical model. In C, the fitness w of individual x is
w = pow(1-s,x);
In nature, some unfit individuals will survive to reproduce, and some fit individuals will die before reproducing, for example through accidents. To model this uncertainty, we draw a uniform random number x between 0.0 and 1.0, and say an individual will survive if .