January 2020
Intermediate to advanced
346 pages
9h 8m
English
To be able to save the best current image every 100 generations, we need to introduce a modification to the main genetic loop. As you may recall, toward the end of Chapter 4, Combinatorial Optimization, we already made one modification to the main loop that allowed us to introduce the elitist approach. To be able to introduce that change, we created the eaSimpleWithElitism() method, which is contained in a file called elitism.py. This method was a modified version of the deap framework's eaSimple() method, which is contained in the algorithms.py file. We modified the original method by adding the elitism functionality, which takes the members of the HOF – the current best individuals – and passes them ...
Read now
Unlock full access