Commit before some experiments with smart argument changing

This commit is contained in:
emil
2024-12-01 19:57:30 +03:00
parent 26d454c976
commit 1562f775af
12 changed files with 1358 additions and 15 deletions
+3 -3
View File
@@ -60,8 +60,8 @@ public class Main {
MUTATIONRATE = 0.34;
}
else { // Ultra-hard sudoku
POPULATIONSIZE = 250000;
TOURNAMENTSIZE = 4;
POPULATIONSIZE = 500000;
TOURNAMENTSIZE = 3;
MUTATIONRATE = 0.15;
}
@@ -311,7 +311,7 @@ public class Main {
// Evaluate the fitness of the Sudoku by counting the number of row, column, and subgrid violations
public void evaluateFitness() {
fitness = countRowViolations() + countColumnViolations() + countSubgridViolations();
fitness = countRowViolations() + countColumnViolations();
}
private int countRowViolations() {