aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/modules/fitness
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/backend/modules/fitness')
-rw-r--r--src/jcgp/backend/modules/fitness/DigitalCircuit.java5
-rw-r--r--src/jcgp/backend/modules/fitness/SymbolicRegression.java5
-rw-r--r--src/jcgp/backend/modules/fitness/TestCaseProblem.java4
3 files changed, 9 insertions, 5 deletions
diff --git a/src/jcgp/backend/modules/fitness/DigitalCircuit.java b/src/jcgp/backend/modules/fitness/DigitalCircuit.java
index b01bdc5..8677d5f 100644
--- a/src/jcgp/backend/modules/fitness/DigitalCircuit.java
+++ b/src/jcgp/backend/modules/fitness/DigitalCircuit.java
@@ -1,11 +1,12 @@
package jcgp.backend.modules.fitness;
import jcgp.backend.function.BitwiseLogic;
+import jcgp.backend.resources.Resources;
public class DigitalCircuit extends TestCaseProblem<Integer> {
- public DigitalCircuit() {
- super();
+ public DigitalCircuit(Resources resources) {
+ super(resources);
functionSet = new BitwiseLogic();
}
diff --git a/src/jcgp/backend/modules/fitness/SymbolicRegression.java b/src/jcgp/backend/modules/fitness/SymbolicRegression.java
index da2e69e..cb9d1a7 100644
--- a/src/jcgp/backend/modules/fitness/SymbolicRegression.java
+++ b/src/jcgp/backend/modules/fitness/SymbolicRegression.java
@@ -1,11 +1,12 @@
package jcgp.backend.modules.fitness;
import jcgp.backend.function.IntegerArithmetic;
+import jcgp.backend.resources.Resources;
public class SymbolicRegression extends TestCaseProblem<Integer> {
- public SymbolicRegression() {
- super();
+ public SymbolicRegression(Resources resources) {
+ super(resources);
functionSet = new IntegerArithmetic();
}
diff --git a/src/jcgp/backend/modules/fitness/TestCaseProblem.java b/src/jcgp/backend/modules/fitness/TestCaseProblem.java
index 7753e26..4259285 100644
--- a/src/jcgp/backend/modules/fitness/TestCaseProblem.java
+++ b/src/jcgp/backend/modules/fitness/TestCaseProblem.java
@@ -51,7 +51,9 @@ public abstract class TestCaseProblem<U> extends Problem {
private ArrayList<TestCase<U>> testCases;
private IntegerParameter maxFitness;
- public TestCaseProblem() {
+ public TestCaseProblem(Resources resources) {
+ super();
+
maxFitness = new IntegerParameter(0, "Max fitness", true, false) {
@Override
public void validate(int newValue) {