From 444b2b5abfbb70473b0785b38eaba1df4197ae69 Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 12 Nov 2023 05:17:19 -0600 Subject: refactor genome to include size information --- src/mind/topology.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mind/topology.js') diff --git a/src/mind/topology.js b/src/mind/topology.js index 9c5ecf7..9f2569d 100644 --- a/src/mind/topology.js +++ b/src/mind/topology.js @@ -49,11 +49,11 @@ function is_hidden(n, index) { export function network_connect(n, source, sink, weight) { if (is_input(n, sink)) { // inputs cannot be sinks - throw new Error("attempt to use input as sink"); + throw new Error(`attempt to use input as sink (${source} -> ${sink})`); } if (is_output(n, source)) { // outputs cannot be sources - throw new Error("attempt to use output as source"); + throw new Error(`attempt to use output as source (${source} -> ${sink})`); } return create({ -- cgit v1.2.1