« Return to Thread: Help with GA concepts

Re: Help with GA concepts

by Klaus Meffert-5 :: Rate this Message:

| View in Thread

Hello Rick,
 
at least answering two of your questions:
2) See class org.jgap.impl.WeightedRouletteSelector
3) Please add all required jars to your class path, at least trove-2.0.2.jar in directory "lib" of the JGAP distribution
 
Best

Klaus
www.klaus-meffert.com

 


From: Rick Liao [mailto:rliiack@...]
Sent: Wednesday, December 28, 2011 12:57 AM
To: jgap-users@...
Subject: [jgap-users] Help with GA concepts

Hello,

I am completely new to genetic algorithm, so can anyone please help answering some of my questions below?
  1. Based on what I read, natural selection selects chromosomes to be mated by genetic operators, but why does the doc on Configuration says, "Normally, you would add a selector that is applied after the genetic operators are processed (a_processBeforeGeneticOperators = false)." Also, in one evolution, how many times does a natural selector runs? How many chromosomes does it select? Does it run until all the population is selected? If not, what happens to those that are not selected?
  2. Is there any example of implementing a natural selector?
  3. When I plug in the code: 
    1. Configuration conf = new DefaultConfiguration(); 
    2. NaturalSelector roulette = new WeightedRouletteSelector(conf); 
    3. conf.addNaturalSelector(roulette, false);       
    4. I got an error of java.lang.NoClassDefFoundError: gnu/trove/THashMap. When I take out the conf in the constructor, it gave me java.lang.IllegalArgumentException: Configuration must not be null! This only happens with WeightedRouletteSelector, so what is really the problem?
Thanks you so much!

Sincerely,
Rick

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
jgap-users mailing list
jgap-users@...
https://lists.sourceforge.net/lists/listinfo/jgap-users

 « Return to Thread: Help with GA concepts