summaryrefslogtreecommitdiff
path: root/src/genome/README.md
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2023-08-10 14:57:01 -0500
committersanine-a <sanine.not@pm.me>2023-08-10 14:57:01 -0500
commit0460985d38d137fd02db4919c66d316a83d2919e (patch)
tree736af5601d2fac8cc570c9da7a840e6b5607a688 /src/genome/README.md
parenteb03b3a341f3c8152db4ee2ee99b85cffb27796e (diff)
use average weight in mutation and add README.md
Diffstat (limited to 'src/genome/README.md')
-rw-r--r--src/genome/README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/genome/README.md b/src/genome/README.md
new file mode 100644
index 0000000..1135ed0
--- /dev/null
+++ b/src/genome/README.md
@@ -0,0 +1,12 @@
+src/genome
+==========
+
+Genomes represent the neural network that underlies a creature. They are an array of tuples of the form `[ source, sink, weight ]`, where:
+
+ * `source` is an integer in the range `[0, N - num_outputs)`, representing the index of the source neuron
+ * `sink` is an integer in the range `[num_inputs, N)`, representing the index of the sink neuron
+ * `weight` is a floating-point value in the range `[-4, 4]`, representing the weight of the connection
+
+`num_input` and `num_output` are fixed by the environment (as they are the input senses and output actions of the creature, respectively).
+`N` is not fixed, but is instead determined by the maximum index present in the genome. As long as the maximum index is greater than or
+equal to `num_input + num_output`, the genome is considered valid.