Best way to implement elitism

1,642 views
Skip to first unread message

MaxiPigna

unread,
Nov 11, 2014, 11:05:50 AM11/11/14
to deap-...@googlegroups.com
What is the best way to implement elitism? By elitism I mean I want to generate a new population made by offsprings keeping also the best individuals of the previous generation. I thought two solutions:
population=offsprings+hall_of_fame
hall_of_fame.update(population)
    or
    population=offsprings+tools.selBest(population, K)
    Do you think they are equivalent, even from the performance point of view, or you would suggest one rather than the other?

    François-Michel De Rainville

    unread,
    Nov 11, 2014, 1:24:16 PM11/11/14
    to deap-...@googlegroups.com
    The standard way would be to use a Mu + Lambda scheme with best selection.

    Cheers,

    MaxiPigna

    unread,
    Nov 12, 2014, 11:08:20 AM11/12/14
    to deap-...@googlegroups.com
    Thank you for the answers. I saw that in the algorithm elitism is implemented in this way.
            population[:] = toolbox.select(population + offspring, mu)



    I preferred to do like this, because I think in this way I can keep an higher grade of diversity in the population.
            population = tools.selBest(offsprings + hall_of_fame, len(population))

    François-Michel De Rainville

    unread,
    Nov 12, 2014, 8:08:23 PM11/12/14
    to deap-...@googlegroups.com
    The method you use is rather called archiving. There is several EA algorithms employing it in the litterature.

    Have fun with DEAP,
    François-Michel

    --
    You received this message because you are subscribed to the Google Groups "deap-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    MaxiPigna

    unread,
    Nov 13, 2014, 10:17:20 AM11/13/14
    to deap-...@googlegroups.com
    I have never heard before the archive term. I looked for the meaning, but if I understand well it means to keep apart the best solutions. But when you use those solutions in the search process, this is elitism. Please correct me if I am wrong, I am a beginner.

    François-Michel De Rainville

    unread,
    Nov 13, 2014, 10:28:05 AM11/13/14
    to deap-...@googlegroups.com
    Applied to evolutionary algorithms, the archive often refers to a seperate set of individual kept apart of your population, but that can still be used to produce new individuals. For example is the SPEA-2 algorithm (multi-objective) : http://www.kddresearch.org/Courses/Spring-2007/CIS830/Handouts/P8.pdf

    Don't quote me for this definition as there can be many good ones, but if I had to search for the type of algorithm you propose in the litterature it would be the keyword I'd use :)

    Regards,

    MaxiPigna

    unread,
    Nov 13, 2014, 10:34:33 AM11/13/14
    to deap-...@googlegroups.com
    Ok, I will read that paper thank you. But can you make a simple example or whatever you prefer to show me the difference between elitism and archiving. Because I do not get it since in both case, as I know, individuals can be used for the search process.

    François-Michel De Rainville

    unread,
    Nov 13, 2014, 10:51:50 AM11/13/14
    to deap-...@googlegroups.com
    I don't think there is any strong definition for both terms. IMHO, elitism is when you copy the best individuals from the last generation population to the next and archiving refers to using a separate archive such as the hall of fame and sample from it. The main difference is that in the latter, some individuals may not have participated to the evolution in the last generation. I admit they can be equivalent in some cases.

    The ultimate goal of DEAP is to allow any user to communicate his evolutionary process precisely, because he knows precisely what he is doing. This is the only reason I have insisted on the terminology. Other than that, you are free to call it whatever name you think is right!

    Best regards,

    Luca Valentini

    unread,
    Nov 13, 2014, 11:37:34 AM11/13/14
    to deap-...@googlegroups.com
    Ok now I understand what you meant. 
    Thank very much for your time.

    --
    You received this message because you are subscribed to the Google Groups "deap-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.



    --
    Luca Valentini
    Reply all
    Reply to author
    Forward
    0 new messages