Island Model in ECJ

296 views Asked by At

In Genetic Programming (GP), when island model is used, does it mean that it will split the population size between islands?

For example, if in parameters file we have

pop.subpop.0.size = 4000

and we have 4 islands, does it mean that each island will have a population of size 1000? What if we put this line of code in parameters file of each island? Is it possible to have different population size for each island?

I'm using Java and ECJ package to implement island models in GP.

2

There are 2 answers

3
Pablo García On BEST ANSWER

No, in your example you only have defined one island of 4000 individuals. The number is never automatically splited.

There are two ways to use Islands model in ECJ:

  • Using InterPopulationExchanger class:

One unique Java process that share variables. The islands are the subpopulations of the Population object. Therefore, you need to set sizes for each subpopulation in the parameter file. In your example, you only have set the island (subpopulation) 0 to 4000 individuals, but you should also set the other sizes. For example, for 10 islands of 4000 individuals each:

exch = ec.exchange.InterPopulationExchange
pop.subpops = 10
pop.subpop.0.size = 4000
pop.subpop.1.size = 4000
pop.subpop.2.size = 4000
...etc
pop.subpop.10.size = 4000
  • Using IslandExchanger class:

In this case, every island is executed in a different Java process, so, every islandID.params file (one per island/process) needs to set only one population:

exch = ec.exchange.InterPopulationExchange
pop.subpop.0.size = 4000

And the number of islands is set in the server.params file:

exch.num-islands = 10

You can see the rest of parameters and more information on page 223 of the ECJ documentation pdf: https://cs.gmu.edu/~eclab/projects/ecj/docs/manual/manual.pdf

1
Mihai Oltean On

I have not studied the ECJ package, but that is the general idea: you have a population which is divided in multiple subpopulations.

I don't know why you want subpopulations of different sizes. Is there a benefit compared to fixed-size subpopulations?

Anyway, I did a very simple implementation of a Genetic-Programming variant with multiple subpopulations. You can download it here: http://www.mepx.org/source_code.html

It is written in C++, but it should be very easy to understand by Java programmers.