diff options
author | Eduardo Pedroni <ep625@york.ac.uk> | 2014-02-10 09:33:54 +0000 |
---|---|---|
committer | Eduardo Pedroni <ep625@york.ac.uk> | 2014-02-10 09:33:54 +0000 |
commit | 6e7747e5b85f4ca93683ed5166f6e480cc58e6fa (patch) | |
tree | e1243f2eb6f743a547b89362e37e516e22f647e8 /src/jcgp/ea | |
parent | 0e34bfdb60c28a6118ec93893ddc7ceb6fa50cb5 (diff) |
Refactored the resources mechanics, implemented a few of the chromosome tests
Diffstat (limited to 'src/jcgp/ea')
-rw-r--r-- | src/jcgp/ea/StandardMutator.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jcgp/ea/StandardMutator.java b/src/jcgp/ea/StandardMutator.java index cab5c76..8af3f5c 100644 --- a/src/jcgp/ea/StandardMutator.java +++ b/src/jcgp/ea/StandardMutator.java @@ -1,7 +1,7 @@ package jcgp.ea; -import jcgp.CGP.Parameters; -import jcgp.CGP.Utilities; +import jcgp.Parameters; +import jcgp.Utilities; import jcgp.population.Chromosome; import jcgp.population.MutableElement; import jcgp.population.Node; @@ -11,7 +11,7 @@ public class StandardMutator implements Mutator { @Override public void mutate(Chromosome chromosome) { - int mutations = (int) (Parameters.getMutationRate() * ((double) Parameters.getNodeNumber() / 100)); + int mutations = (int) (Parameters.getMutationRate() * ((double) Parameters.getNodeCount() / 100)); for (int i = 0; i < mutations; i++) { MutableElement m = Utilities.getRandomMutable(chromosome); |