Skip to content
Extraits de code Groupes Projets
Valider 3aa8980c rédigé par Jonathan CROUZET's avatar Jonathan CROUZET
Parcourir les fichiers

Debug : Fixed mutation

parent 048e3a1f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -22,7 +22,7 @@ void ibea(evaluate_function_t evaluate,
int mu = 20; /* number of binary tournament */
double eta = 20; /* polynomiale mutation degree */
double p_combination = 1;
double p_mutation = 0.01;
double p_mutation = 0.1;
double kappa = 0.05;
/* Initialize */
......@@ -33,9 +33,6 @@ void ibea(evaluate_function_t evaluate,
/* Iterations */
int m = 0;
while (m < n_generations){
printf("gen : %d\n", m);
pop.printPopulation();
sleep(1);
/* 2 Fitness assignment */
pop.evaluate(evaluate);
pop.compute_indicators();
......
......@@ -52,7 +52,7 @@ void mutate(Population & population,
for (int j=0; j<dimension; j++){
u = coco_random_uniform(random_generator);
if (u <= p_mutation){
population.setIndiv(i,j,polynomiale_mutation(population.getIndiv(i,j), eta, lower_bounds[j], upper_bounds[j], random_generator));
population.setIndiv(i,j,polynomiale_mutation(population.getIndiv(i,j), lower_bounds[j], upper_bounds[j], eta, random_generator));
}
}
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter