I am trying to implement an optimization genetic algorithm for some mathematical functions, and I am having some trouble with the selection function. Sometimes it is functio