blob: 1135ed01ff9cd5788377b0aff9c2c032f8577458 (
plain)
1
2
3
4
5
6
7
8
9
10
11
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.
|