Genetic algorithms #1 code attempt