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.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/jcgp/population/Chromosome.java b/src/jcgp/population/Chromosome.java
index 3e61a10..996e765 100644
--- a/src/jcgp/population/Chromosome.java
+++ b/src/jcgp/population/Chromosome.java
@@ -300,4 +300,22 @@ public class Chromosome {
}
return false;
}
+
+ public void printNodes() {
+ for (int r = 0; r < Parameters.getRows(); r++) {
+ System.out.print("r: " + r + "\t");
+ for (int c = 0; c < Parameters.getColumns(); c++) {
+ System.out.print("N: (" + r + ", " + c + ") ");
+ for (int i = 0; i < Parameters.getMaxArity(); i++) {
+ System.out.print("C" + i + ": (" + nodes[r][c].getConnection(i).getDescription() + ") ");
+ }
+ System.out.print("F: " + nodes[r][c].getFunction().toString() + "\t");
+ }
+ System.out.print("\n");
+ }
+
+ for (int o = 0; o < Parameters.getOutputs(); o++) {
+ System.out.print("o: " + o + " (" + outputs[o].getSource().getDescription() + ")\t");
+ }
+ }
}