I read through the NEAT paper and I understand the algorithm now.
But one thing is still unclear to me. When does the mutation occur and how does it take place? How is it chosen whether it is an adding node or adding connection mutation? Furthermore how is it chosen where the mutation is taking place in the network (between which connections)?
First of all: the NEAT paper is very broad. It does not give a lot of concrete implementions. But in most GA implementions, mutation occurs after new genomes have been created from parent genomes.
Before you get into NEAT, make sure to study how genetic algorithms work in the first place.
In most cases, the chance that a certain mutation occurs is evenly distributed among the mutation methods. For example, if you have 3 mutation methods (add_node, add_conn and mod_weight) and mutationRate = 0.3
, then each of those methods has 0.1
chance of being executed on the genome.
Sometimes adding a connection is not possible, so adding a node might have a higher chance of being executed.
The location of the mutation in the network is also random. Mutation is random overall.
But you are asking very broad questions. The paper you referenced only states how you could implement an effective neuroevolution of network topology. It forms a base for your own project. How you implement it, is all up to you (and what works best for the network!)