blob: 2a417db9e99abb321f84343ce389361388c1738d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
package jcgp;
public class Parameters {
private static int rows, columns, inputs, outputs, levelsBack,
mutationRate, populationSize, totalGenerations,
currentGeneration = 0, totalRuns, currentRun = 0,
maxArity;
public static int getRows() {
return rows;
}
public static int getColumns() {
return columns;
}
public static int getNodeCount() {
return rows * columns;
}
public static int getInputs() {
return inputs;
}
public static int getOutputs() {
return outputs;
}
public static int getLevelsBack() {
return levelsBack;
}
public static int getMutationRate() {
return mutationRate;
}
public static int getPopulationSize() {
return populationSize;
}
public static int getTotalGenerations() {
return totalGenerations;
}
public static int getCurrentGeneration() {
return currentGeneration;
}
public static int getTotalRuns() {
return totalRuns;
}
public static int getCurrentRun() {
return currentRun;
}
public static int getMaxArity() {
return maxArity;
}
public static void setRows(int rows) {
Parameters.rows = rows;
}
public static void setColumns(int columns) {
Parameters.columns = columns;
}
public static void setInputs(int inputs) {
Parameters.inputs = inputs;
}
public static void setOutputs(int outputs) {
Parameters.outputs = outputs;
}
public static void setLevelsBack(int levelsBack) {
Parameters.levelsBack = levelsBack;
}
public static void setMutationRate(int mutationRate) {
Parameters.mutationRate = mutationRate;
}
public static void setPopulationSize(int populationSize) {
Parameters.populationSize = populationSize;
}
public static void setTotalGenerations(int totalGenerations) {
Parameters.totalGenerations = totalGenerations;
}
public static void setCurrentGeneration(int currentGeneration) {
Parameters.currentGeneration = currentGeneration;
}
public static void incrementCurrentGeneration() {
Parameters.currentGeneration++;
}
public static void setTotalRuns(int totalRuns) {
Parameters.totalRuns = totalRuns;
}
public static void setCurrentRun(int currentRun) {
Parameters.currentRun = currentRun;
}
public static void setMaxArity(int maxArity) {
Parameters.maxArity = maxArity;
}
}
|