2

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.

Laurel
  • 5,965
  • 14
  • 31
  • 57
ashkanent
  • 205
  • 2
  • 10

2 Answers2

0

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.

Mihai Oltean
  • 159
  • 1
  • 9
  • I was trying different settings on each island but for the final experiment I used the fixed-size for all of them. I just wanted to make sure that each island will have a population of (population size)/(number of islands). There was no easy way to confirm it in ECJ. – ashkanent Aug 16 '15 at 14:25
0

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

Pablo García
  • 237
  • 1
  • 10
  • what if I put the 'pop.subpop.0 = 4000' in server.params file and not mention it (the population size) in islandID.params. In this case, would it split the 4000 between all islands? – ashkanent Sep 10 '15 at 17:58
  • If you launch server.params calling to ec.exchanger.IslandExchange (not ec.Evolve) this parameter won't be used. If you use it with ec.Evolve will create the server island with 4000 individuals. – Pablo García Sep 11 '15 at 10:48
  • So, you have to explicitly set the population in each island manually, there is no way to automatically divide the number. In that case you can use a script to generate the parameter files. See my script as an example of running a lot of parameter configurations (including different number of islands): https://github.com/fergunet/HPMOON/blob/master/launch.py – Pablo García Sep 11 '15 at 10:55