CodeReclaimers / neat-python

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

How to further evolve a network? #138

Open mikrino97 opened 6 years ago

mikrino97 commented 6 years ago

After looking through the issues I have seen that people have asked how to save and load networks which can be done with pickle. However, I am interested in further evolving a network that has already been saved. For example, I am using neat to solve a trajectory optimization problem which runs for 1 cycle (8 seconds). I evolved a network to solve this problem over 10,000 generations and saved the best network. Now I want to continue evolving the same network but I want to simulate it for 2 cycles (16 seconds).

If the cycles part is not possible I'm still interested in being able to continue evolving a saved network. the problem with the checkpoint method is that it doesn't save the best network, it just saves the ith network which is usually very lousy compared to the best one.

evolvingfridge commented 6 years ago

Only think I can think of where checkpoint would not save best solution is because you reaching config.fitness_threshold.

Kuselokusi commented 5 years ago

Hi @mikrino97 , I would like to know if your inquiry/issue is referring to an evolved network where it makes a prediction then the evolved network (or the best network previously found) is retrained with all the data available then it makes the next prediction etc. If this is what you are referring to, I would like to know whether you sorted out the issue and if so how you did it. I am currently trying to do the same thing and would appreciate any pointers please.

Gicminos commented 4 years ago

I would like to do the same too, like save the last generation (so not only one genome) and proceed the evolution from that generation later.