Skip to content

Commit 9de5f9b

Browse files
committed
MutatePerturb.performOperation calculation is not correct #148
1 parent 16cca5a commit 9de5f9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/encog/ml/genetic/mutate/MutatePerturb.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void performOperation(Random rnd, Genome[] parents, int parentIndex,
6060

6161
for(int i=0;i<parent.size();i++) {
6262
double value = parent.getData()[i];
63-
value += (perturbAmount - (rnd.nextDouble() * perturbAmount * 2));
63+
value += value * (perturbAmount - (rnd.nextDouble() * perturbAmount * 2));
6464
child.getData()[i] = value;
6565
}
6666
}

0 commit comments

Comments
 (0)