Genetic Algorithm Code