this question is a follow-on to answer of this question about python deap genetic algorithm library: How to add elimination mechanism in Python genetic algorithm based on DEAP
using reference code from deap github: https://github.com/DEAP/deap/blob/master/examples/ga/onemax.py
line 112
while max(fits) < 100 and g < 1000: #from onemax.py
on the deap github example 'onemax_mp.py': https://github.com/DEAP/deap/blob/master/examples/ga/onemax_mp.py
how do i add a max(or min) condition similar to max(fits) < 100
in the onemax_mp.py?
if i do add this condition is this condition applied to each process in the entire multi-process pool of processes?
if one process meets the end condition are the other processes halted?
right now it seems that i can only control the number of generations:
https://github.com/DEAP/deap/blob/master/examples/ga/onemax_mp.py
line 40
algorithms.eaSimple(pop, toolbox, cxpb=0.5, mutpb=0.2, ngen=40, stats=stats, halloffame=hof) #ngen=40 means calculate 40 generations
i am new to stackoverflow, please let me know if i need to edit this question to fit forum rules