diff options
Diffstat (limited to 'src/jcgp/backend/modules/mutator')
-rw-r--r-- | src/jcgp/backend/modules/mutator/PointMutator.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jcgp/backend/modules/mutator/PointMutator.java b/src/jcgp/backend/modules/mutator/PointMutator.java index 9e421c2..5aba0d1 100644 --- a/src/jcgp/backend/modules/mutator/PointMutator.java +++ b/src/jcgp/backend/modules/mutator/PointMutator.java @@ -3,7 +3,7 @@ package jcgp.backend.modules.mutator; import jcgp.backend.parameters.BooleanParameter; import jcgp.backend.parameters.IntegerParameter; import jcgp.backend.population.Chromosome; -import jcgp.backend.population.MutableElement; +import jcgp.backend.population.Mutable; import jcgp.backend.population.Node; import jcgp.backend.population.Output; import jcgp.backend.resources.Resources; @@ -41,7 +41,7 @@ public abstract class PointMutator extends Mutator { // for however many genes must be mutated for (int i = 0; i < genesMutated.get(); i++) { - MutableElement m = chromosome.getRandomMutableElement(); + Mutable m = chromosome.getRandomMutable(); if (report.get()) getResources().report("[Mutator] Mutation " + i + " selected " + m + ", "); @@ -69,7 +69,7 @@ public abstract class PointMutator extends Mutator { if (report.get()) getResources().reportln("to " + ((Node) m).getFunction()); } else { // if we decided to mutate connection, subtract 1 from geneType so it fits into the arity range - geneType -= 1; + geneType--; if (report.get()) getResources().report("changed connection " + geneType + " from " + ((Node) m).getConnection(geneType) + " "); m.setConnection(geneType, chromosome.getRandomConnection(((Node) m).getColumn())); |