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

pareto_fronts is from previous generation #275

Open
kaurao opened this issue Feb 16, 2024 · 1 comment
Open

pareto_fronts is from previous generation #275

kaurao opened this issue Feb 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kaurao
Copy link

kaurao commented Feb 16, 2024

The ga_instance.pareto_fronts available after ga_instance.run() is calculated on ga_instance.previous_generation_fitness, it should be updated to reflect ga_instance.last_generation_fitness.

ahmedfgad added a commit that referenced this issue Feb 17, 2024
Release Date 17 February 2024
1. After the last generation and before the `run()` method completes, update the 2 instance attributes: 1) `last_generation_parents` 2) `last_generation_parents_indices`. This is to keep the list of parents up-to-date with the latest population fitness `last_generation_fitness`.  #275
@ahmedfgad ahmedfgad added the bug Something isn't working label Feb 17, 2024
ahmedfgad added a commit that referenced this issue Feb 17, 2024
Release Date 17 February 2024
1. After the last generation and before the `run()` method completes, update the 2 instance attributes: 1) `last_generation_parents` 2) `last_generation_parents_indices`. This is to keep the list of parents up-to-date with the latest population fitness `last_generation_fitness`.  #275
2. 4 methods with names starting with `run_`. Their purpose is to keep the main loop inside the `run()` method clean. Check the [Other Methods](https://pygad.readthedocs.io/en/latest/pygad.html#other-methods) section for more information.
@ahmedfgad ahmedfgad mentioned this issue Feb 17, 2024
@ahmedfgad
Copy link
Owner

Thank you! This issue is resolved in a recent commit. Please update to PyGAD 3.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants