How to confirm elitism is working..

172 views
Skip to first unread message

Chris Ralph

unread,
Nov 29, 2013, 9:08:15 AM11/29/13
to pyev...@googlegroups.com
Hi all,
I've just started using PyEvolve (which is fantastic!), but I have a question regarding the elitism options.  I have a search configured using the following options:

    ga = GSimpleGA.GSimpleGA(genome)
    pop = ga.getPopulation()
    pop.scaleMethod.set(Scaling.SigmaTruncScaling)
    ga.selector.set(Selectors.GRankSelector)
    ga.setGenerations(500)
    ga.setElitism(True)
    ga.setElitismReplacement(20)
    ga.setPopulationSize(200)
    ga.setMutationRate(.05)

, and the results from my last three generations look like this:

Gen. 480 (96.00%): Max/Min/Avg Fitness(Raw) [1264100392.79(0.00)/264100392.79(-1000000000.00)/939100392.79(-325000000.00)]
Gen. 490 (98.00%): Max/Min/Avg Fitness(Raw) [1255293466.96(0.00)/255293466.96(-1000000000.00)/935293466.96(-320000000.00)]
Gen. 500 (100.00%): Max/Min/Avg Fitness(Raw) [1237307660.64(0.00)/237307660.64(-1000000000.00)/927307660.64(-310000000.00)]

My question is:  if elitism is turned on, how is it possible that the Max Fitness is decreasing from one generation to the next?  Doesn't elitism automatically promote the best individuals to the next generation?

Any help would be greatly appreciated!
Chris

Mario

unread,
Dec 11, 2013, 1:59:09 AM12/11/13
to pyev...@googlegroups.com
Hi Chris

Maybe this post (https://groups.google.com/forum/#!topic/pyevolve/9fYj02-UhaI) will help on your problem? 

Please let me know,
kind regards
Mario

Chris Ralph

unread,
Dec 18, 2013, 9:42:39 AM12/18/13
to pyev...@googlegroups.com
Hi Mario,
Thanks very much for this, but I'm not sure if this helps.  Maybe I'm not interpreting this implementation of Elitism correctly, but it seems like it's being used to influence the selection of parent genomes for crossover but not being included in the decision of which solutions to promote to the subsequent generation.

For example, if I have a population of size 100 and an elite set of size 10, and there are no new child genomes in the current generation with higher fitness than any in the current elite set, then the maximum fitness for the current generation will be lower than the previous one.  I think the way that this should work is that the current elite set should be added to the current child genomes (so, 100 children + 10 elite = 110 genomes), sorted by fitness (i.e. sort the 110), and the 100 best promoted to the next generation.  Using this method, the elite set not only impacts the selection process but also serves as the "memory" for the overall system.. i.e., it guarantees that the highest fitness never decreases from one generation to the next.

Does anyone know if there's any way to achieve this using in PyEvolve?

Thanks again!
Chris

Marven

unread,
Apr 22, 2016, 2:14:23 PM4/22/16
to pyevolve
Hey Chris,

I hope you're still active in this thread since some time has past since you're question.
I just wanted to ask whether you got any helpful answer/solution for your problem? Although it's nearly 3 years later now, I'm still facing the same issue and can't find any helpful solution for it..

Thanks a lot!
Marven
Reply all
Reply to author
Forward
0 new messages