diff options
author | sanine-a <sanine.not@pm.me> | 2023-08-10 14:57:01 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2023-08-10 14:57:01 -0500 |
commit | 0460985d38d137fd02db4919c66d316a83d2919e (patch) | |
tree | 736af5601d2fac8cc570c9da7a840e6b5607a688 /src/genome/genome.test.js | |
parent | eb03b3a341f3c8152db4ee2ee99b85cffb27796e (diff) |
use average weight in mutation and add README.md
Diffstat (limited to 'src/genome/genome.test.js')
-rw-r--r-- | src/genome/genome.test.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/genome/genome.test.js b/src/genome/genome.test.js index 853d103..ca56092 100644 --- a/src/genome/genome.test.js +++ b/src/genome/genome.test.js @@ -14,7 +14,7 @@ test('basic gene mutations', () => { expect(mutate([0, 1, 2], mutation_type.sink, 0.8)).toEqual([0, 2, 2]);
expect(mutate([0, 0, 2], mutation_type.sink, 0.2)).toEqual([0, 0, 2]);
- expect(mutate([0, 1, 2], mutation_type.weight, 0.5)).toEqual([0, 1, 0]);
- expect(mutate([0, 1, 2], mutation_type.weight, 0.0)).toEqual([0, 1, -4]);
- expect(mutate([0, 1, 2], mutation_type.weight, 1.0)).toEqual([0, 1, 4]);
+ expect(mutate([0, 1, 2], mutation_type.weight, 0.5)).toEqual([0, 1, 1]);
+ expect(mutate([0, 1, 2], mutation_type.weight, 0.0)).toEqual([0, 1, -1]);
+ expect(mutate([0, 1, 2], mutation_type.weight, 1.0)).toEqual([0, 1, 3]);
});
|