From 7f89d81e6f8a5ce82d42c3b852b5219edaa4b86c Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Wed, 7 May 2014 18:38:27 +0100 Subject: Removed reflection for now, added fitness orientation support --- src/jcgp/backend/modules/mutator/PointMutator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jcgp/backend/modules/mutator') 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())); -- cgit v1.2.3