Print

Print


Hey Johanna,

For Barbosa & Herrmann's worst-case evaluation, it would probably be  
easiest to create your own fitness class (smth like WorstFitness), in  
which for every call to setFitness you would do a comparison with the  
current worst value and potentially update. You may or may not also  
want a reset function, which you could call from your problem's  
prepareToEvaluate or preprocessPopulation.

For the fancier type of evaluation you want to do, I think I would  
implement a new Evaluator class and use it with SimpleFitness. In  
this class you could keep your matrix, entries of which you would  
fill after each call to problem.evaluate by querying the fitness(es)  
of the pair of evaluated individuals. After the matrix is filled, you  
can update/overwrite the fitnesses as you wish.

You could also try to use the existing  
MultiPopCoevolutionaryEvaluator and do some of the above stuff in  
your problem, but I think it would be more difficult and less  
reusable (if you want to apply the same algorithm to a different  
problem).

Hope this makes sense,
Elena


On Feb 12, 2008, at 12:53 PM, Johanna Rosenbusch wrote:

> Hello everybody,
>
> I have a question concerning the fitness evaluation (in coevolution).
>
> I want to do worst case optimization and I am testing my solutions
> (population 1) against scenarios (population 2). The fitness of my  
> solutions
> is quite easy to determine - it's the worst outcome of the  
> interactions and
> I can more or less use SimpleFitness. The fitness of the scenarios  
> is more
> difficult to determine - which is why I would like to test a few ideas
> before deciding on one.
> Therefore I need to define a new fitness and I am wondering where  
> to start.
> The fitness of one scenario depends not only on the outcome of the
> interactions with the solutions but also on the performance of the  
> other
> scenarios. For example:
>
> Imagine each solution is tested against each scenario and then  
> lists the
> scenarios according to the results. The worst case scenario for  
> example
> would get the highest rank. Now the fitness of a scenario is equal  
> to the
> highest rank it achieves for any rule.
>
> You see, I need quite a lot of information and before I started  
> using ECJ I
> imagined I would first do all the interactions, get a matrix of the  
> results,
> and then compute the fitness values. Now I found out that in ECJ  
> the fitness
> is actually computed during the interaction of two individuals.  
> Where in the
> algorithm do I have access to the information I need and can define  
> the
> fitness accordingly? As it seems to me, I cannot do it just by  
> modifying
> Fitness.
>
> Thanks for every comment!
>
> Johanna