CodeReclaimers / neat-python

Python implementation of the NEAT neuroevolution algorithm
BSD 3-Clause "New" or "Revised" License
1.4k stars 488 forks source link

Elitism not working as intended... #253

Open nino192 opened 1 year ago

nino192 commented 1 year ago

My elitism is set to 2, pop size is 30. species elitism is 1 and there is no stagnation. Im keep getting weird oscilations in max fitness of a generation. If elitism is present, shouldnt it mean that 2 of the most fit individuals are directly transferred into next generation? That would mean that there is no chance of lowering the maximum fitness... Also, I've noticed the oscilations occur in generations when new species is created.

Here is an example graph using the neat-visualize:

1 Im fairly new to the library so any explanation would be appreciated.

markste-in commented 1 year ago

Is your environment always the same on every run or is slightly randomised? It could be that your best species just "had a bad day" on particular environment config (like it stumbled over a stone :D )?

Can you give us more details?