From PyGAD's documentation the best_solutions attribute saves the best solution of every generation:
save_best_solutions=False: When True, then the best solution after each generation is saved into an attribute named best_solutions. If False (default), then no solutions are saved and the best_solutions attribute will be empty. Supported in PyGAD 2.9.0.
I would like an attribute to exist which would be the single best solution from all generations, rather than the existing best_solutions attribute that is a list of the best solutions from every generation. This would be helpful because the single best solution is not always the best solution of the last generation.
From PyGAD's documentation the
best_solutions
attribute saves the best solution of every generation:I would like an attribute to exist which would be the single best solution from all generations, rather than the existing
best_solutions
attribute that is a list of the best solutions from every generation. This would be helpful because the single best solution is not always the best solution of the last generation.Something on the lines of (untested example):