Open tearfur opened 2 years ago
I am not sure, but it seems like setting keep_parents=0
might be a fix?
@tearfur, Thank you.
Thanks @martinandrovich for your suggestion.
By setting:
keep_parents=0
keep_elitism=0
save_solutions=False
(Default)Then you guarantee that no fitness is re-used. This means the fitness function will be called for each single solution in each generation.
PyGAD version: 2.16.3
Please specify somewhere in the docs that PyGAD is only geared for deterministic problems, and are not suitable for subjects that will produce different outputs even when given the same inputs, such as games. Or we would very welcome PyGAD to account for stochastic problems in the future.
We had to find out about this ourselves by digging into
GA.cal_pop_fitness()
to find out that parents kept from the previous generation will directly use the fitness value calculated during the previous generation.Thank you.