GithubHelp home page GithubHelp logo

Comments (4)

DSKritzinger avatar DSKritzinger commented on August 15, 2024 1

This makes sense now! Thank you.

from geneticalgorithmpython.

urowietu avatar urowietu commented on August 15, 2024

from geneticalgorithmpython.

DSKritzinger avatar DSKritzinger commented on August 15, 2024

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.

ahmedfgad avatar ahmedfgad commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.