Print

Print


In order to get our asynchronous steady-state code working properly,  
we finally bit the bullet and made a modification to the evaluate()  
and describe() methods.  These methods, across the board, now must  
have an additional argument: the subpopulation[s] of the individual 
[s] being evaluated.  To implement this in your Problem, all you have  
to do is modify the method to include this argument, and that's all.   
If you have implemented an Evaluator, you will need to provide this  
data to evaluate() and describe().  It's not on CVS but will be soon.

Why this change?  Because when you do asynchronous steady-state with  
remote slaves, you send off individuals to the remote slaves to be  
evaluated and they come back at various times.  When they come back,  
you have to put the individual back in the subpopulation where he  
belongs.  But the slave mechanism doesn't know what subpopulation to  
stick him in: they rely entirely on the evaluate() method to do their  
work.

We used various hacks to get around this for other remote slave  
stuff, but finally we couldn't do it any more with the asynchronous  
evaluation and so we've broken down and made this non-backward- 
compatable change for the better.  Sorry everyone.

More specifically, SimpleProblemForm now looks like this:

public interface SimpleProblemForm
     {
     public void evaluate(final EvolutionState state,
                          final Individual ind,
                          final int subpopulation,  //  NEW
                          final int threadnum);

     public void describe(final Individual ind,
                          final EvolutionState state,
                          final int subpopulation,  //  NEW
                          final int threadnum,
                          final int log,
                          final int verbosity);
     }



And GroupedProblemForm looks like this:

public interface GroupedProblemForm
     {
     public void preprocessPopulation(final EvolutionState state,  
Population pop);
     public void postprocessPopulation(final EvolutionState state,  
Population pop);
     public void evaluate(final EvolutionState state,
                          final Individual[] ind,
                          final boolean[] updateFitness,
                          final boolean countVictoriesOnly,
                          final int[] subpops, 			 //  NEW
                          final int threadnum);
     }

Sean