summaryrefslogtreecommitdiff
path: root/src/genome/genome.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/genome/genome.js')
-rw-r--r--src/genome/genome.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/genome/genome.js b/src/genome/genome.js
index 8e0c9f0..e2bf83e 100644
--- a/src/genome/genome.js
+++ b/src/genome/genome.js
@@ -41,7 +41,7 @@ export function mutate(gene, type, value) {
case mutation_type.weight:
const w = (8*value) - 4;
- return [ source, sink, w ];
+ return [ source, sink, 0.5*(w + weight) ];
default:
throw new Error(`unknown mutation type: '${type}'`);