Genetic algorithm example written in Java