Result Function for Genetic Optimization