Genetic Algorithm implementation