diff --git a/Main.java b/Main.java index db30672..b695b09 100644 --- a/Main.java +++ b/Main.java @@ -11,7 +11,7 @@ public class Main { // Threshold of number of mutable positions for easy level sudoku public static int EASYTHRESHOLD = 60; public static int HARDTHRESHOLD = 70; - // List to store the population of chromosomes + // List to store the population of chromosomes List population = new ArrayList<>(); Random random = new Random(); @@ -58,9 +58,9 @@ public class Main { MUTATIONRATE = 0.057; } else { // Ultra-hard sudoku - POPULATIONSIZE = 2000; - TOURNAMENTSIZE = 10; - MUTATIONRATE = 0.2; + POPULATIONSIZE = 20000; + TOURNAMENTSIZE = 4; + MUTATIONRATE = 0.032; } // Generate initial population of 100 chromosomes diff --git a/statistical/demo/src/main/java/com/example/Main.java b/statistical/demo/src/main/java/com/example/Main.java index 528516d..4258789 100644 --- a/statistical/demo/src/main/java/com/example/Main.java +++ b/statistical/demo/src/main/java/com/example/Main.java @@ -63,9 +63,9 @@ public class Main { MUTATIONRATE = 0.055; } else { // Ultra-hard sudoku - POPULATIONSIZE = 2000; - TOURNAMENTSIZE = 10; - MUTATIONRATE = 0.2; + POPULATIONSIZE = 20000; + TOURNAMENTSIZE = 4; + MUTATIONRATE = 0.032; } // Generate initial population of chromosomes @@ -106,7 +106,7 @@ public class Main { generation++; // Plot the fitness graph every 10 generations - if (generation % 10 == 0) { + if (generation % 100 == 0) { mainInstance.plotFitness(fitnessValues); } diff --git a/statistical/demo/target/classes/com/example/Main.class b/statistical/demo/target/classes/com/example/Main.class index d7163d2..27b60fa 100644 Binary files a/statistical/demo/target/classes/com/example/Main.class and b/statistical/demo/target/classes/com/example/Main.class differ