Closed
Description
The default behavior of best_solution()
is to re-run cal_pop_fitness()
to get the best_solution. This is explained on the docs too in https://pygad.readthedocs.io/en/latest/README_pygad_ReadTheDocs.html?highlight=gene_type#best-solution. Workaround is to use:
ga_instance.best_solution(pop_fitness=ga_instance.last_generation_fitness)
Why this is chosen as the default?
Metadata
Metadata
Assignees
Labels
No labels