diff options
Diffstat (limited to 'src/genome/genome.test.js')
-rw-r--r-- | src/genome/genome.test.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/genome/genome.test.js b/src/genome/genome.test.js index f50531b..0ad8d80 100644 --- a/src/genome/genome.test.js +++ b/src/genome/genome.test.js @@ -2,7 +2,7 @@ import {
mutation_type, mutate,
- is_valid,
+ get_size,
} from './genome';
@@ -23,9 +23,14 @@ test('basic gene mutations', () => { });
-test('genome validation', () => {
- expect(is_valid(0, 0, [ [ 0, 0, 1.0 ] ])).toBe(true);
- expect(is_valid(2, 1, [ [ 0, 2, 1 ] ])).toBe(true);
- expect(is_valid(2, 1, [ [ 0, 1, 1 ] ])).toBe(false);
- expect(is_valid(2, 1, [ [ 0, 2, 5 ] ])).toBe(false);
+test('genome validation and size', () => {
+ expect(get_size(0, 0, [ [ 0, 0, 1.0 ] ])).toBe(1);
+ expect(get_size(2, 1, [ [ 0, 2, 1 ] ])).toBe(3);
+ expect(get_size(2, 1, [ [ 0, 1, 1 ] ])).toBe(-1);
+ expect(get_size(2, 1, [ [ 0, 2, 5 ] ])).toBe(-1);
+});
+
+
+test('parse a genome into a neural net', () => {
+
});
|