Here's how I'd go about doing it:
For the high level, the individual is a doubleVectorIndividual of
parameter values. The low level EC could be anything (GA, GP, etc)
You need a special meta-problem:
public class MetaProblem extends Problem, implements SimpleProblemForm
private ParameterDatabase lowLevelDB;
public static final String P_PARAM_FILE = "param-file";
private int job=0;
//setup loads a new private ParameterDatabase from some .params file
setup(paramDB pdb, Param base)
File f = pdb.getFile(base.push(P_PARAM_FILE));
lowLevelDB = new ParameterDatabase(f);
public void evaluate(final EvolutionState state,
final Individual ind,
final int threadnum)
//read ind gene by gene, and save each parameter/gene's value in
//It's important that the meta GA is a fixed representation
//thing, so ind2 does not see some parameter setting set by ind1.
Evolve lowLevelState= initialize(parameters, job++);
//look in Evolve.main() for the rest of the details
This will not compile right off the bat, as I wrote it directly in pine ;)
If there's enough interest, we could include an abstract MetaProblem in
ECJ, but it's Sean Luke's call.
n Thu, 25 May 2006, kahina ka wrote:
> Apologies if this problem has been covered before. Iím trying to implement a
> Multilevel GA for my problem (running base GAs within a meta level GA) and
> was wondering if there is anything that facilitates this within ECJ? Or if
> anyone can give me any pointers on how to go about it. Any help would be
> very much appreciated.
> Thank you and kind regards to all.
> Are you using the latest version of MSN Messenger? Download MSN Messenger
> 7.5 today! http://join.msn.com/messenger/overview