aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/chromosome
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/chromosome')
-rw-r--r--src/jcgp/chromosome/Chromosome.java79
-rw-r--r--src/jcgp/chromosome/Population.java16
-rw-r--r--src/jcgp/chromosome/element/ChromosomeElement.java7
-rw-r--r--src/jcgp/chromosome/element/Input.java11
-rw-r--r--src/jcgp/chromosome/element/MutableElement.java5
-rw-r--r--src/jcgp/chromosome/element/Node.java20
-rw-r--r--src/jcgp/chromosome/element/Output.java12
-rw-r--r--src/jcgp/chromosome/functions/Function.java7
-rw-r--r--src/jcgp/chromosome/functions/FunctionSet.java14
9 files changed, 0 insertions, 171 deletions
diff --git a/src/jcgp/chromosome/Chromosome.java b/src/jcgp/chromosome/Chromosome.java
deleted file mode 100644
index cdf2e4b..0000000
--- a/src/jcgp/chromosome/Chromosome.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package jcgp.chromosome;
-
-import java.util.ArrayList;
-
-import jcgp.CGP;
-import jcgp.chromosome.element.Input;
-import jcgp.chromosome.element.Node;
-import jcgp.chromosome.element.Output;
-
-public class Chromosome {
-
- private ArrayList<Input> inputs;
- private ArrayList<ArrayList<Node>> nodes;
- private ArrayList<Output> outputs;
-
- /**
- * Good citizen.
- *
- */
- public Chromosome() {
-
- inputs = new ArrayList<Input>(CGP.INPUTS);
- for (int i = 0; i < CGP.INPUTS; i++) {
- inputs.add(new Input());
- }
-
- // rows first
- nodes = new ArrayList<ArrayList<Node>>(CGP.ROWS);
- for (int r = 0; r < CGP.ROWS; r++) {
- nodes.add(new ArrayList<Node>(CGP.COLUMNS));
- for (int c = 0; c < CGP.COLUMNS; c++) {
- nodes.get(r).add(new Node());
- }
- }
-
- outputs = new ArrayList<Output>(CGP.OUTPUTS);
- for (int o = 0; o < CGP.OUTPUTS; o++) {
- outputs.add(new Output());
- }
- }
-
- public int getActiveNodeCount() {
- return 0;
- }
-
- /**
- * @return the inputs
- */
- public final ArrayList<Input> getInputs() {
- return inputs;
- }
-
- /**
- * @return the nodes
- */
- public final ArrayList<ArrayList<Node>> getNodes() {
- return nodes;
- }
-
- /**
- * @return the outputs
- */
- public final ArrayList<Output> getOutputs() {
- return outputs;
- }
-
- public final Node getNode(int row, int column) {
- return nodes.get(row).get(column);
- }
-
- public final Output getOutput(int index) {
- return outputs.get(index);
- }
-
- public final Input getInputs(int index) {
- return inputs.get(index);
- }
-
-}
diff --git a/src/jcgp/chromosome/Population.java b/src/jcgp/chromosome/Population.java
deleted file mode 100644
index e720a24..0000000
--- a/src/jcgp/chromosome/Population.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package jcgp.chromosome;
-
-import java.util.ArrayList;
-
-public class Population {
-
- private ArrayList<Chromosome> population;
-
- public Population(int size) {
- population = new ArrayList<Chromosome>(size);
- for (int c = 0; c < size; c++) {
- population.add(new Chromosome());
- }
- }
-
-}
diff --git a/src/jcgp/chromosome/element/ChromosomeElement.java b/src/jcgp/chromosome/element/ChromosomeElement.java
deleted file mode 100644
index 2dc9107..0000000
--- a/src/jcgp/chromosome/element/ChromosomeElement.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package jcgp.chromosome.element;
-
-public abstract class ChromosomeElement {
-
- public abstract int evaluate();
-
-}
diff --git a/src/jcgp/chromosome/element/Input.java b/src/jcgp/chromosome/element/Input.java
deleted file mode 100644
index de051dc..0000000
--- a/src/jcgp/chromosome/element/Input.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package jcgp.chromosome.element;
-
-public class Input extends ChromosomeElement {
-
- @Override
- public int evaluate() {
- // TODO Auto-generated method stub
- return 0;
- }
-
-}
diff --git a/src/jcgp/chromosome/element/MutableElement.java b/src/jcgp/chromosome/element/MutableElement.java
deleted file mode 100644
index 0122c69..0000000
--- a/src/jcgp/chromosome/element/MutableElement.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package jcgp.chromosome.element;
-
-public interface MutableElement {
-
-}
diff --git a/src/jcgp/chromosome/element/Node.java b/src/jcgp/chromosome/element/Node.java
deleted file mode 100644
index 761c3c9..0000000
--- a/src/jcgp/chromosome/element/Node.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package jcgp.chromosome.element;
-
-import jcgp.chromosome.functions.Function;
-
-
-public class Node extends ChromosomeElement implements MutableElement {
-
- private Function function;
-
- public Node() {
-
- }
-
- @Override
- public int evaluate() {
- // TODO Auto-generated method stub
- return 0;
- }
-
-}
diff --git a/src/jcgp/chromosome/element/Output.java b/src/jcgp/chromosome/element/Output.java
deleted file mode 100644
index ee4d204..0000000
--- a/src/jcgp/chromosome/element/Output.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package jcgp.chromosome.element;
-
-
-public class Output extends ChromosomeElement implements MutableElement {
-
- @Override
- public int evaluate() {
- // TODO Auto-generated method stub
- return 0;
- }
-
-}
diff --git a/src/jcgp/chromosome/functions/Function.java b/src/jcgp/chromosome/functions/Function.java
deleted file mode 100644
index 27697be..0000000
--- a/src/jcgp/chromosome/functions/Function.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package jcgp.chromosome.functions;
-
-public abstract class Function {
-
- public abstract int run();
-
-}
diff --git a/src/jcgp/chromosome/functions/FunctionSet.java b/src/jcgp/chromosome/functions/FunctionSet.java
deleted file mode 100644
index e9d197a..0000000
--- a/src/jcgp/chromosome/functions/FunctionSet.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package jcgp.chromosome.functions;
-
-import java.util.ArrayList;
-
-public class FunctionSet {
-
- private ArrayList<Function> functions;
-
- public FunctionSet() {
- functions = new ArrayList<Function>();
- }
-
-
-}