Subject: | |
From: | |
Reply To: | |
Date: | Sun, 30 Jan 2011 19:43:20 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Nikola, this doesn't appear to have anything to do with
MultiPopCoevolutionaryEvaluator. Your "evaluate" function (located
for some reason in your MyFitness class, though I'd expect that to be
in Problem subclass, not a Fitness subclass) is expecting a
BitVectorIndividual, but you've got FloatVectorIndividuals being
created in the parameter file somewhere. You can find out where by
running with the command-line arguments:
-p print-params=true
This will print out all the parameters as they're requested. Look for
FloatVectorIndividual to find out where you're specifying it.
Warning. We're making a lot more changes to the coevolutionary
package (which significantly improve it), many presently out on SVN.
So expect more incompatibilities to come.
Sean
On Jan 30, 2011, at 7:21 PM, Nikola N. wrote:
> Hello,
>
> I tried lately in my ecj experiments to migrate from ecj19 to ecj20,
> however
> I had problems.
> Namely the program in ecj19 is functioning with the given .params
> file. I
> have MultiPopCoevolutionaryEvaluator for co-evolution of two species
> (bits
> and floats).
> However when trying to run the same program with ecj20 with the
> almost same
> .params file there is a problem stating:
>
> "java.lang.ClassCastException: ec.vector.FloatVectorIndividual
> cannot be
> cast to ec.vector.BitVectorIndividual
> at main.SonicApp.MyFitness.evaluate(MyFitness.java:279)
> at
> ec
> .coevolve
> .MultiPopCoevolutionaryEvaluator
> .performCoevolutionaryEvaluation
> (MultiPopCoevolutionaryEvaluator.java:251)
> at
> ec
> .coevolve
> .MultiPopCoevolutionaryEvaluator
> .evaluatePopulation(MultiPopCoevolutionaryEvaluator.java:167)
> at
> ec.simple.SimpleEvolutionState.evolve(SimpleEvolutionState.java:76)
> at
> main.SonicApp.StartEvolExprThread.run(StartEvolExprThread.java:265)
> at
> main.SonicApp.StartEvolExprThread.run(StartEvolExprThread.java:200)"
>
> I said "almost same .params" since I am aware that there are some
> changes in
> ecj20, so the change in the .params file was minimal - only to
> remove the
> stuff that is not anymore supported in the new ecj20 version.
> Here is the part of the adapted .params file, supposed to run with
> ecj20:
>
> "
> eval.num-current = 4
> eval.num-elites = 1
> eval.num-prev = 2
> eval.select-current = ec.select.RandomSelection
> eval.select-prev = ec.select.RandomSelection
>
> eval.subpop.0.select =
> ec.select.TournamentSelection
> eval.subpop.0.select.size = 2
> #---
> #-eval.subpop.0.num-elites = 1
> #-eval.subpop.0.num-rand-ind = 5
> #-eval.subpop.0.num-ind = 2
>
> eval.subpop.1.select =
> ec.select.TournamentSelection
> eval.subpop.1.select.size = 2
> #---
> #-eval.subpop.1.num-elites = 1
> #-eval.subpop.1.num-rand-ind = 5
> #-eval.subpop.1.num-ind = 2
>
> pop.subpops = 2
> ...
> "
>
> Only the parts starting with "#-" have been commented out.
> Everything else
> is the same. The program in ecj19 runs. The program with ecj20
> doesn't run.
>
> I guess that the problem can be probably tracked to the changes in the
> "MultiPopCoevolutionaryEvaluator.java" but I am not sure ?!
> Any comments/help on how to solve this issue ?
>
>
> ...By the way, I also didn't got reply on my previous questions in
> message
> with subject: "Setting up the genome size and other evolutionary
> parameters
> in the program code" :(
>
>
> Nikola
|
|
|