Scale: Island

Suggest edits
Documentation > Scale
Islands : a Custom Distribution Method for GA on distributed environments

For distributed environments the island distribution scheme is well adapted. Islands of population evolve for a while on a remote node. When an island is finished, its final population is merged back into a global archive. A new island is then generated until the termination criterion: i.e. the total number of islands to generate is met.

Islands scheme is used via a specific task, IslandEvolution to be added in the workflow.

The task take three parameters:
  • an evolution task method, which is the calibration task (SteadyStateEvolution in the example below ), to be distributed on the nodes of the distributed environment
  • parallelism : the number of concurrent islands that evolve at a given time
  • the termination criterion is the total number of evolutions performed by all the islands. In the example below, each island performs 100 iterations of their evolution tasks, so for 100 islands, this parameter is set to 100*100= 10000.

// Generate a workflow that orchestrates 100 concurrent islands.
// The workflow stops when 10,000 islands of 5 minutes have completed.
val evolution =
    genome = Seq(x in (0.0, 1.0), y in (0.0, 1.0)),
    objectives = Seq(o1, o2),
    evaluation = model,
    termination = 10000,
    parallelism = 100,
    distribution = Island(5 minutes)

// Definition of a hook to save the population of solutions on the local machine running OpenMOLE
val savePopulation = SavePopulationHook(evolution, workDirectory / "evolution")

// Construction of the complete mole with the execution environment, and the hook.
// Here the generated workflow will run using 4 threads of the local machine.
(evolution on LocalEnvironment(4) hook savePopulation)