1

Solution space by NEAT is restricted to 2 layers ANNs. Can't file parameters for config file so that I can get more than 2 layers.

I started modifying and using the xor2.py file of NEAT to use for my dataset. Therefore, my code for NEAT is working but I want to move beyond 2 layer ANNs. Right now I am stuck with 2 layers ANNs in the solution space. Is there a way to specify in the config file that I need 3 or more layers? I tried checking all params that go into config file, but couldn't find that. Link - https://neat-python.readthedocs.io/en/latest/config_file.html

Aastha Dua
  • 53
  • 7

1 Answers1

1

The NEAT algorithm is a genetic algorithm that starts with a lot of ANNs that are simply 2 layers: input and output. Through training, these ANNs change and add nodes until they are rather large and can solve a problem easily. It sounds like you either aren't training your population at all, or you are not training them enough to actually give them time to grow other nodes and layers.

Also, an xor problem cannot be solved in a 2 layer ANN. I believe the minimal and optimal solution is one with 3 layers, so hopefully your population evolves to that.

voice
  • 1,326
  • 1
  • 11
  • 16
  • Do you have a reference of how many generations (approximate order of magnitude) should one train a network to get a reasonably optimal network topology? – Aastha Dua Mar 04 '19 at 00:07
  • It entirely depends on the problem. To solve a minimal xor problem, implementations have often found that a population of 150 over 300 generations or so should result in a model that is pretty good. Increasing both the population and number of generations will always bring about a closer model. – voice Mar 04 '19 at 07:45