Comments (4)
This makes sense now! Thank you.
from geneticalgorithmpython.
from geneticalgorithmpython.
Although 'quantile' parent selection is an option, the main reason for my raised 'issue', is due to the incorrect implementation of 'rank parent selection'. It is also maybe necessary to provide more details in the project documentation regarding the details of the selection methods or at least link an article off of which the selection methods were based for the reader to understand the method.
These recommendations are solely made as I really enjoy using this project and feel it has a lot of potential.
from geneticalgorithmpython.
Hi,
Thanks for raising this issue. It opened my eyes over something to be changed.
First of all, I confirm that there is no issue in the implementation. It could be regarded as duplicating the same feature. Let me make things clear.
For the rank parent selecting, the parents are ranked according to their fitness values and the ones with the highest fitness values are selected as parents. Based on those selected parents, offspring are created. In the next generation, the population will be formed only from the offspring and the parents are not selected.
For the steady-state parent selection, then it already works as the rank parent selection type but the difference is that it keeps the parents in the current generation in the population of the next generation. This is why this selection type is called steady-state as it keeps the best state (solution) until better state (solution) is found.
You can find more information about the selection types at this link.
In this project (PyGAD), initially I made the steady-state parent selection to include the parent in the next generation. So, keeping the parents in the next generation was an exclusive feature to the steady-state parent selection only.
In a later release of PyGAD, I made a change to make things general to support keeping the parents in the next population for any type of parent selection. This is by using the keep_parents
parameter in the constructor of the pygad.ga
class. Check the documentation of the parameters here: https://pygad.readthedocs.io/en/latest/README_pygad_ReadTheDocs.html#init
When the keep_parents
parameter is set to-1
, then all the parents are kept in the next population. This is exactly what the steady-state selection was working initially.
After supporting the keep_parents
parameter, I should have removed the steady-state selection and just kept the rank selection as it works exactly as the steady-state selection when keep_parents=-1
.
I keep this into consideration in the next release of PyGAD.
Thank you too much for the notice.
Please let me know if you have any more doubts or suggestions.
Regards,
Ahmed
from geneticalgorithmpython.
Related Issues (20)
- Force recalculation of fitness values for each new generation ? HOT 7
- Fitness value of a solution computed multiple times per generation? HOT 5
- The on_generation callback is not called at the end of generation 0 HOT 2
- GA
- Convergence issue: good solution appears to be forgotten, resulting best solution is not even valid HOT 1
- Error when running 3.2.0 vs. 3.1.0 for ga_instance.best_solutions HOT 1
- ga_instance.save will not work with tqdm example HOT 2
- fitness function is being saved? HOT 2
- Cannot modify the attributes of the ga_instance when running multiple processes in parallel HOT 1
- Manipulate solution before saving it as parent HOT 5
- `pareto_fronts` is from previous generation HOT 1
- `initial_population` not effectively used/retained for multiobjective problems? HOT 4
- Training traffic sign recognition with faster rcnn using ga HOT 1
- ga_instance.best_solution() does not return the solution that minimizes my fitness function HOT 2
- delay_after_gen warning HOT 3
- Is NSGA-III supported? HOT 1
- Caching of Fitness Values for Elites/Kept Parents
- pygad.kerasga
- ga_instance.best_solution() only returning best parameters and fitness of previous Generation HOT 1
- Matplotlib imported by pyGAD
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geneticalgorithmpython.