7

I've been reading up on how NEAT (Neuro Evolution of Augmenting Topologies) works and i've got the main idea of it, but one thing that's been bothering me is how you split the different networks into species. I've gone through the algorithm but it doesn't make a lot of sense to me and the paper i read doesn't explain it very well either so if someone could give a explanation of what each component is and what it's doing then that would be great thanks.

The 2 equations are:

$\delta = \frac{c_{1}E}{N} + \frac{c_{2}E}{N} + c_{3} .W$

$f_{i}^{'} = \frac{f_i}{\sum_{j=1}^{n}sh(\delta(i,j))}$

The original paper

Jeremy Cochoy
  • 2,480
  • 2
  • 24
  • 39
Aguy
  • 169
  • 11
  • 2
    It should be clear, even *after* posting, that LaTex rendering is *not* supported here... – desertnaut Dec 16 '18 at 11:02
  • Ah im sorry, the reason i put it on here was because i'm going to use it to program an A.I that uses NEAT. Also considering the LaTex issue, i'm new to it and so i don't fully know how it works so any help on that would be great – Aguy Dec 16 '18 at 11:49
  • 1
    Being new to something and not knowing yet how it works is perfectly fine; seeing that what you have posted looks literally like gibberish and leaving it like that is not. *Assuming* that your question was on-topic (it is not), it would be much preferable to just paste images of the equations from the paper... – desertnaut Dec 16 '18 at 12:09
  • 1
    My answer to this related question may be helpful to you. A common way to speciate is to use k-means on the genomes (which may be compared thanks to the way NEAT encodes information). https://stackoverflow.com/questions/50960834/neat-speciating/51837691#51837691 – Pablo Dec 17 '18 at 13:08

1 Answers1

6

Speciation in NEAT is similar to fitness sharing used by other evolutionary algorithms. The idea is to penalize similar solutions, creating a pressure toward a more diverse population.

The delta term is a measure of distance between two solutions. The measure of distance used here is specialized for the variable-length genomes used by NEAT. Small delta values indicate more similar solutions.

The sharing function implemented in NEAT results in a value of 0 or 1 if the distance between two solutions is greater or less than a given threshold, respectively. Each solution is compared to each other solution in the candidate population, and the fitness is modified by the sum of resulting sharing function values. If a solution is similar to several other solutions in the population it's modified fitness will be significantly reduced.

Matt
  • 1,342
  • 5
  • 12
  • Thankyou, i have 3 more questions if you don't mind answering. 1. During cross-over does the offspring inherit the structure and weights of the more fit parent with the exception of the extra connections gained through historical markers? 2. In the delta-fitness function from what I've read "W" is the average weight difference between matching genes. Does that mean with all the connections that line up calculate the difference in weights, and then get the average? 3. When calculating the adjusted fitness do you compare it to every NeuralNet or just the ones in its species group? – Aguy Dec 17 '18 at 11:59
  • 3
    For crossover there are different implementations. It is typical to inherit randomly common traits, then inherit those exclusive from the fittest and, only with some chance, those of the weaker. – Pablo Dec 17 '18 at 13:10
  • 2
    Fair warning, I'm familiar with the ideas behind NEAT but not the exact implementation. 1. I believe Pablo is correct. 2. I also believe your assessment is correct, it is simply the average difference of weights belonging to the matching connections. 3. You compare it to every other solution in the population, you can't know whether or not solutions belong to the same species until you have compared them. If two solutions belong to different species then comparing them will produce a sharing function value of 0, resulting in no change to the modified fitness. – Matt Dec 17 '18 at 16:45