From b1615d03b16c2acdebea87de1c2f348b8bb9efc6 Mon Sep 17 00:00:00 2001 From: emil Date: Wed, 27 Nov 2024 23:48:19 +0300 Subject: [PATCH] 37.5 points commit --- Main.java | 8 ++++---- .../demo/src/main/java/com/example/Main.java | 8 ++++---- .../target/classes/com/example/Main.class | Bin 8854 -> 8853 bytes 3 files changed, 8 insertions(+), 8 deletions(-) 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 d7163d2c30a743a5c12d29f45c8a23714dfbc1f6..27b60faa56d16a1a6f19d3b69a726fa04b0f97ce 100644 GIT binary patch delta 345 zcmXYr&nv?L7{)*E+IK&UX||ah*2+aY5Gysg%}O*Bktj1eEX9FcwS$ARzHxEj;vg(q zVSdacCl^ggyWlU7gPY=&-JYKJd7tOA72k{>2MqgeDpC2||1JcLgxlGKK?BIUnf2aF zx7q6pI=r6YPyxT)oby#BZT9(hav${b#Q;AHiiII@kq|ed;$=))8J92<5@AxJOi7Gs zNirj=%*r}R*zjtZ|~AQvp+4saL0% rajx~(rLgUkRMm5%!(pto#WI#!@2&R!w>4^8%xnpaNMj)r=y3f4+(=70 delta 346 zcmXZW&nv@m9LMqJn|(L?VL#e;z6Z6Gizw2Rn(J1gMG=WIKWb7O*x3#)&c0Ek++46| z<;VP(6$j-&D}{sj3!I$2mwis}UZ2nB^?qz6x05H9;drbc?QHl# zVs_k&y3LU5xj-c7vD4=x4dyo4Dl0^ z7xGH2qg6_Frl~s@=Zr2K%K7A+3k*fQa;a~eN~=)BiAzy=t~6_qUe-C)%&ov#t~K*0 rGs%tq^(wZFTb+EAba6Y5+QvKTYQ1Ic{cj6sTf(-iAqf^TR;Tw5vujE*