I have implemented an algorithm using python-NEAT to evolve game agents in a Unity game. The configuration file of python-NEAT is configured to have 72 agents in the population.
If i configure the genomes to have anything else than 0 in initial hidden nodes neat will suddenly after some generations (num_hidden of 2 or more will double the population size after 2-3 generations) change the amount of genomes it is passing to the evaluation function. This breaks my implementation as i can only handle a fixed amount of agents.
Due to the environment at hand being of a more complex nature (3D DodgeBall shooter), starting training with 0 hidden nodes feels like a waste of time (NEAT might possibly change the population size once it ads enough hidden nodes anyways so it does not feel like a workaround to just start with 0 hidden nodes.)
Repository: https://github.com/KristianTve/DodgeBallEANN
Does anyone know why NEAT suddenly changes the population size and diverges from the configured number? Is this a bug or just how NEAT works?
EDIT: Same thing happened when starting out with 0 hidden nodes. At generation 1015, NEAT suddenly supplies 71 genomes instead of the configured 72.