Package ec.spatial

Class SpatialBreeder

All Implemented Interfaces:
Setup, Singleton, Serializable

public class SpatialBreeder extends SimpleBreeder
A slight modification of the simple breeder for spatially-embedded EAs. Breeds each subpopulation separately, with no inter-population exchange, and using a generational approach. A SpatialBreeder may have multiple threads; it divvys up a subpopulation into chunks and hands one chunk to each thread to populate. One array of BreedingSources is obtained from a population's Species for each operating breeding thread.
See Also:
  • Constructor Details

    • SpatialBreeder

      public SpatialBreeder()
  • Method Details

    • setup

      public void setup(EvolutionState state, Parameter base)
      Description copied from interface: Setup
      Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.
      Specified by:
      setup in interface Setup
      Overrides:
      setup in class SimpleBreeder
    • breedPopChunk

      protected void breedPopChunk(Population newpop, EvolutionState state, int[] numinds, int[] from, int threadnum)
      Description copied from class: SimpleBreeder
      A private helper function for breedPopulation which breeds a chunk of individuals in a subpopulation for a given thread. Although this method is declared public (for the benefit of a private helper class in this file), you should not call it.
      Overrides:
      breedPopChunk in class SimpleBreeder