Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching of Fitness Values for Elites/Kept Parents #289

Open
kingjin94 opened this issue Apr 23, 2024 · 1 comment
Open

Caching of Fitness Values for Elites/Kept Parents #289

kingjin94 opened this issue Apr 23, 2024 · 1 comment
Labels
question Further information is requested

Comments

@kingjin94
Copy link

Hi there,

Thank you for your great toolbox!

I have a question regarding caching of fitness values in pygad. It seems that any elite or kept parents fitness function will always be just retrieved. Is there a way to force recalculation? In my case, the fitness is non-deterministic, and I have local search capabilities, i.e., Lamarkian evolution, that would be especially useful for the promising elites or selected parents to further improve their fitness if they somehow could be evaluated again.

@ahmedfgad ahmedfgad added the question Further information is requested label Jan 7, 2025
@ahmedfgad
Copy link
Owner

This is covered in this section of the documentation: https://pygad.readthedocs.io/en/latest/pygad_more.html#solve-non-deterministic-problems

import pygad
...
ga_instance = pygad.GA(...,
                       keep_elitism=0,
                       keep_parents=0,
                       save_solutions=False,
                       save_best_solutions=False,
                       ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants