aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/population/Chromosome.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/population/Chromosome.java')
-rw-r--r--src/jcgp/population/Chromosome.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/jcgp/population/Chromosome.java b/src/jcgp/population/Chromosome.java
index 1f264f2..08ff9b9 100644
--- a/src/jcgp/population/Chromosome.java
+++ b/src/jcgp/population/Chromosome.java
@@ -104,7 +104,7 @@ public class Chromosome {
// populate with connections equivalent to clone
Connection copyConnection;
for (int i = 0; i < connections.length; i++) {
- copyConnection = clone.getNode(r, c).getConnections(i);
+ copyConnection = clone.getNode(r, c).getConnection(i);
if (copyConnection instanceof Input) {
connections[i] = inputs[((Input) copyConnection).getIndex()];
} else if (copyConnection instanceof Node) {
@@ -251,12 +251,11 @@ public class Chromosome {
recomputeActiveNodes = false;
activeNodes = new ArrayList<Connection>();
- for (int r = 0; r < nodes.length; r++) {
- for (int c = 0; c < nodes[r].length; c++) {
-
- }
+ for (Output output : outputs) {
+ output.getActiveNodes(activeNodes);
}
- }
+
+ }
return activeNodes;
}