I am trying to implement NEAT algorithm in Python from scratch. However, I am stuck. When a new innovation number is created it has two nodes which represents the connection. Also this innovation number has a weight.

However, I know that innovation numbers are global variables, in other words when a innovation number is created,

ex. Innovation ID:1 - Node:1 to Node:4 - weight: 0.5

it will have a ID which will be used by other connections to represent the connection between Node:1 to Node:4.

When this innovation is used by another neural network, will it also use the weight of the innovation 1, which is 0.5 in this example?


1 Answer 1


Quoting Evolving neural networks through augmenting topologies, p. 10 (emphasis mine):

When crossing over, the genes in both genomes with the same innovation numbers are lined up. These genes are called matching genes. Genes that do not match are either disjoint or excess, depending on whether they occur within or outside the range of the other parent’s innovation numbers. They represent structure that is not present in the other genome. In composing the offspring, genes are randomly chosen from either parent at matching genes, whereas all excess or disjoint genes are always included from the more fit parent.

Innovation numbers are used to line up genes in different genomes so you can perform crossover on networks with different topologies. Each network can optimise the weights in matching genes in a different way, so the weights are not shared. If they were, crossover would have nothing to contribute towards diversifying the population.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .