|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
BulkFitFn doesn't mutate or breed?I successfully used JGAP with a FitnessFunction, and then tried using a BulkFitnessFunction. After the first evaluation of the population by my BulkFitnessFunction, all subsequent calls to evaluate() contain the same chromosomes, albeit in different order within the population.
In effect, I see no breeding or mutating when I use the Bulk function, whereas I do see bredding/mutating with a FitnessFunction. Do I need to do something differently in my calling routine? I call evolve() repeatedly, just like I did with the FitnessFunction. Does the Breeder need to be set up differently? I'm using stock configuration settings. Thank you, Mike ------------------------------------------------------------------------------ _______________________________________________ jgap-users mailing list jgap-users@... https://lists.sourceforge.net/lists/listinfo/jgap-users |
|
|
Re: BulkFitFn doesn't mutate or breed?Mike,
normally, the bulk fitness function should work like a
fitness function, seen from an abstract perspective.
In example examples.dynamicMutation.DynamicMutationExample
there is a bulk fitness function used, maybe this points out something
useful.
If your problem still persists, sending your code to my
hands would help analyzing the problem.
Best
------------------------------------------------------------------------------ _______________________________________________ jgap-users mailing list jgap-users@... https://lists.sourceforge.net/lists/listinfo/jgap-users |
|
|
Re: BulkFitFn doesn't mutate or breed?Klaus, thank you for the prompt response. After more investigation, my issue appears to lie within the evolve code for GABreeder. The behavior is quite different for bulk fitness functions compared to standard fitness functions.
For the case of fitness function, we 1) evaluate fitness 2) apply natural selection 3) apply genetic operators 4) evaluate fitness 5) apply natural selection For the case of bulk fitness function, we 1) apply natural selection 2) apply genetic operators 3) apply natural selection 4) evaluate fitness Let's see if you agree with my analysis: public Population evolve(Population a_pop, Configuration a_conf) <snip> // Ensure fitness value of all chromosomes is udpated. // --------------------------------------------------- updateChromosomes(pop, a_conf); Reading the code, I see that updateChromosomes does nothing if a bulk fitness function is set, but does evaluate if a normal fitness function is set. <snip> pop = applyNaturalSelectors(a_conf, pop, true); // Execute all of the Genetic Operators. // ------------------------------------- applyGeneticOperators(a_conf, pop); <snip> // Ensure fitness value of all chromosomes is udpated. // --------------------------------------------------- updateChromosomes(pop, a_conf); Again, nothing done above if bulk, but the population is reevaluated if not bulk fitness function. // Apply certain NaturalSelectors after GeneticOperators have been applied. // ------------------------------------------------------------------------ pop = applyNaturalSelectors(a_conf, pop, false); // If a bulk fitness function has been provided, call it. // ------------------------------------------------------ BulkFitnessFunction bulkFunction = a_conf.getBulkFitnessFunction(); if (bulkFunction != null) { /**@todo utilize jobs: bulk fitness function is not so important for a * prototype! */ bulkFunction.evaluate(pop); } If we have a bulk fitness function, it is applied for the first time. <snip> Is this the intended behavior? My hypothesis is that for the bulk fitness case, applying the second natural selection removes any genetic operators that were applied after the first natural selection. That would be consistent with the populations I see. Thank you for your help! You've put together an ausgezeichnet package. Cheers, Mike On Fri, Jul 24, 2009 at 11:32 AM, Klaus Meffert <jgap@...> wrote:
------------------------------------------------------------------------------ _______________________________________________ jgap-users mailing list jgap-users@... https://lists.sourceforge.net/lists/listinfo/jgap-users |
|
|
Re: BulkFitFn doesn't mutate or breed?Mike,
I agree with your analysis to the respect that in method
updateChromosomes no evaluation is executed. However, later on execute is called
for the bulk fitness function.
Regarding the natural selectors (there are pre- and
post-selectors), it seems as you write in your numbered list. However, there are
two different selectors (pre and post), so not the same selector is executed
twice. Often, only pre- or only post-selectors exist.
Could you send me a version of your code that compiles and
that shows the problem?
This would help me change the logic so that it solves your
problem and works with other developments.
Thanx
and best
------------------------------------------------------------------------------ _______________________________________________ jgap-users mailing list jgap-users@... https://lists.sourceforge.net/lists/listinfo/jgap-users |
| Free embeddable forum powered by Nabble | Forum Help |