37.5 points commit
This commit is contained in:
@@ -58,9 +58,9 @@ public class Main {
|
|||||||
MUTATIONRATE = 0.057;
|
MUTATIONRATE = 0.057;
|
||||||
}
|
}
|
||||||
else { // Ultra-hard sudoku
|
else { // Ultra-hard sudoku
|
||||||
POPULATIONSIZE = 2000;
|
POPULATIONSIZE = 20000;
|
||||||
TOURNAMENTSIZE = 10;
|
TOURNAMENTSIZE = 4;
|
||||||
MUTATIONRATE = 0.2;
|
MUTATIONRATE = 0.032;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate initial population of 100 chromosomes
|
// Generate initial population of 100 chromosomes
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ public class Main {
|
|||||||
MUTATIONRATE = 0.055;
|
MUTATIONRATE = 0.055;
|
||||||
}
|
}
|
||||||
else { // Ultra-hard sudoku
|
else { // Ultra-hard sudoku
|
||||||
POPULATIONSIZE = 2000;
|
POPULATIONSIZE = 20000;
|
||||||
TOURNAMENTSIZE = 10;
|
TOURNAMENTSIZE = 4;
|
||||||
MUTATIONRATE = 0.2;
|
MUTATIONRATE = 0.032;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate initial population of chromosomes
|
// Generate initial population of chromosomes
|
||||||
@@ -106,7 +106,7 @@ public class Main {
|
|||||||
generation++;
|
generation++;
|
||||||
|
|
||||||
// Plot the fitness graph every 10 generations
|
// Plot the fitness graph every 10 generations
|
||||||
if (generation % 10 == 0) {
|
if (generation % 100 == 0) {
|
||||||
mainInstance.plotFitness(fitnessValues);
|
mainInstance.plotFitness(fitnessValues);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user