ec
Class Breeder

java.lang.Object
  extended by ec.Breeder
All Implemented Interfaces:
Setup, Singleton, java.io.Serializable
Direct Known Subclasses:
DEBreeder, MuCommaLambdaBreeder, PSOBreeder, SimpleBreeder, SpatialBreeder, SPEA2Breeder

public abstract class Breeder
extends java.lang.Object
implements Singleton

A Breeder is a singleton object which is responsible for the breeding process during the course of an evolutionary run. Only one Breeder is created in a run, and is stored in the EvolutionState object.

Breeders typically do their work by applying a Species' BreedingPipelines on subpopulations of that species to produce new individuals for those subpopulations.

Breeders may be multithreaded. The number of threads they may spawn (excepting a parent "gathering" thread) is governed by the EvolutionState's breedthreads value.

Be careful about spawning threads -- this system has no few synchronized methods for efficiency's sake, so you must either divvy up breeding in a thread-safe fashion and assume that all individuals in the current population are read-only (which you may assume for a generational breeder which needs to return a whole new population each generation), or otherwise you must obtain the appropriate locks on individuals in the population and other objects as necessary.

Version:
1.0
Author:
Sean Luke
See Also:
Serialized Form

Constructor Summary
Breeder()
           
 
Method Summary
abstract  Population breedPopulation(EvolutionState state)
          Breeds state.population, returning a new population.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ec.Setup
setup
 

Constructor Detail

Breeder

public Breeder()
Method Detail

breedPopulation

public abstract Population breedPopulation(EvolutionState state)
Breeds state.population, returning a new population. In general, state.population should not be modified.