I'm currently trying to code the NEAT algorithm by myself, but I got stuck with two questions. Here they are:
What happens if during crossover a node is removed (or disabled) and there's a connection that was previously connected to that specific node? Because, in that case, some connections are no longer useful. Do I keep the useless connections or do I prevent this from happening? Or maybe I'm missing something?
Someone on AI SE said that:
You could:
1.) Use only the connection genes in crossover, and derive your node genes from the connection genes
2.) Test if every node is in use, and delete the ones that are not
But the problem with that is that my genomes will lose some complexity. Maybe I can use the nodes during crossover, and then disable the connections that were using this node. That way, I'm keeping the genotype complex, but the phenotype is still working.
Is there another way to workaround this problem or this is the best way?