Reputation: 41
I'm working with NEAT right now and I have a few questions regarding the numbering of newly created nodes. My first assumption was that whenever a certain connection (identified by innovation number for example) is split, it should be split into the same two connections and create the same new node. But this seems to produce weird results when certain conditions are met.
I have a very basic example, let's say my starting net (with inputs 1&2, ouput 3) had been composed of these connections:
(1,3), (2,3)
Let's say the first connection has been split to create this net:
(1,4), (4,3), (2,3)
And then the (1,3) connection would be added back in to form this:
(1,4), (4,3), (2,3), (1,3)
If the (1,3) connection were split again, it shouldn't be split into (1,4) & (4,3) again, right? But instead into something like (1,5) & (5,3).
Does this mean, that whenever a connection is split a completely new node number must be given to the new node?
Wouldn't this cause a massive, artificial explosion in the number of species because basicly every splittin of a connection creates two completely new connections?
Upvotes: 3
Views: 455
Reputation: 760
You are correct in that whenever a connection is split a completely new node_id must be given to the new node and that the split connection cannot again split into the (1,4) and (4,3) genes and therefore eliminate existing genes.
Splitting the (1,3) connection in a [(1,4), (4,3), (2,3), (1,3)] genotype would therefore indeed result in the addition of the (1,5) and (5,3) genes.
This however, does not cause a massive explosion in the number of species. Here is why: Each of these connections is assigned a certain identifier, called innovation number. If the same mutation (splitting connection (1,3)) occurs in 2 separate genomes within the mutation phase of the same generation, then the resulting connections are assigned the same innovation number.
This innovation number is used to compare and cluster genomes into species. Not the amount of node_ids 2 separate genomes may have in common (in case that's what you thought).
Take a look at the following figure taken from O.Stanley's PhD thesis that illustrates a crossover operation in NEAT, though serves well to also illustrate the process of aligning and comparing 2 separate genomes. Similar alignment and comparison is done when clustering genomes into species.
If you would like to read more about NEAT's speciation methods take a look at O.Stanley's PhD thesis on NEAT (which is the closest thing to an official specification of NEAT that is available), particularly chapter 3.3.
If you would like to learn more about Neuroevolution in general take a look at the following introduction to the fundamentals
Hope this helps and feel free to ask if anything is still unclear. =)
Upvotes: 0