com.rubecula.darwin.core
Interface Darwinian

All Superinterfaces:
Generatable, Identifiable
All Known Implementing Classes:
Darwinian_Abstract, Darwinian_Default

public interface Darwinian
extends Generatable, Identifiable

Defines the methods supported by an evolutionary computation (Darwinian) system. The properties of such a system are:

populations
a variable set of Population instances, each governed by the attributes of this system (but typically existing in diverse environments);
fecundity
the (variable) implementer of the Fecundity interface,
which defines how well system-governed organisms reproduce;
genome
the (fixed) implementer of the Genome interface, which defines the genome for all system-governed organisms;
phenome
the (fixed) implementer of the Phenome interface,
which defines the phenome for all system-governed organisms;
mortality
the (variable) implementer of the Mortality interface, which defines how likely system-governed organisms are to die;
ode
the (fixed) "oid"ity of the genome (haploid, diploid);
chooser
the (variable) implementer of the MateChoice interface, which defines how system-governed organisms choose a mate;
population listeners
a (variable) set of implementers of the PopulationListener interface, each of which will be notified via its callback method when the population changes (typically at the end of each generation)
census taker
the (fixed) implementer of the Census interface, which defines how census operations are performed on the populations.

Version:
$Revision: 1.2 $
Author:
Robin Hillyard

Method Summary
 boolean add(Population population)
          Mutating method to add a population to the system.
 void census(PrintWriter writer)
          Method to enumerate this population for census purposes.
 Census getCensusTaker()
           
 MateChoice getChooser()
           
 Factory getFactory()
           
 Fecundity getFecundity()
           
 Genome getGenome()
           
 Mortality getMortality()
           
 Phenome getPhenome()
          Method to get the phenome for this system, i.e.
 Population getPopulation(int index)
           
 void seedGeneration(int organisms)
          Method to seed the system by seeding a certain number of new organisms in each of the system's populations.
 void setChooser(MateChoice chooser)
          MUTATING method to explicitly set the implementer of MateChoice.
 void setFecundity(Fecundity fecundity)
          MUTATING method to explicitly set the implementer of Fecundity.
 void setMortality(Mortality mortality)
          MUTATING method to explicitly set the implementer of Mortality.
 void setupListeners(EnvironmentListener listener)
          Set up environment listeners.
 void setupListeners(PopulationListener listener)
          Mutating method to add, for each of this system's populations, a listener, i.e.
 int size()
           
 
Methods inherited from interface com.rubecula.darwin.core.Generatable
getGeneration, midGenerationProcessing, nextGeneration, postGenerationCleanup, preGenerationPreparation
 
Methods inherited from interface com.rubecula.util.Identifiable
getIdentifier
 

Method Detail

add

boolean add(Population population)
Mutating method to add a population to the system.

Parameters:
population - an implementer of Population.
Returns:
true if the population was added successfully.

census

void census(PrintWriter writer)
Method to enumerate this population for census purposes.

Parameters:
writer - the print writer to which census results will be sent.
See Also:
CensusUtils.DefaultEnumeration(java.util.Iterator, com.rubecula.darwin.core.Census, java.io.PrintWriter)

getCensusTaker

Census getCensusTaker()
Returns:
the application-specific implementer of Census.

getChooser

MateChoice getChooser()
Returns:
the application-specific implementer of MateChoice.

getFactory

Factory getFactory()
Returns:
the implementer of Factory for this system.

getFecundity

Fecundity getFecundity()
Returns:
the application-specific implementer of Fecundity.

getGenome

Genome getGenome()
Returns:
the Genome for this Darwinian System.

getMortality

Mortality getMortality()
Returns:
the application-specific implementer of Mortality.

getPhenome

Phenome getPhenome()
Method to get the phenome for this system, i.e. the implementer of Phenome.

Returns:
value of (private) field _Phenome.

getPopulation

Population getPopulation(int index)

seedGeneration

void seedGeneration(int organisms)
Method to seed the system by seeding a certain number of new organisms in each of the system's populations.

Parameters:
organisms - the number of new organisms to create in each population.

setChooser

void setChooser(MateChoice chooser)
MUTATING method to explicitly set the implementer of MateChoice.

Parameters:
chooser - an application-specific implementation of MateChoice.

setFecundity

void setFecundity(Fecundity fecundity)
MUTATING method to explicitly set the implementer of Fecundity.

Parameters:
fecundity - an application-specific implementation of Fecundity.

setMortality

void setMortality(Mortality mortality)
MUTATING method to explicitly set the implementer of Mortality.

Parameters:
mortality - an application-specific implementation of Mortality.

setupListeners

void setupListeners(EnvironmentListener listener)
Set up environment listeners.

Parameters:
listener -

setupListeners

void setupListeners(PopulationListener listener)
Mutating method to add, for each of this system's populations, a listener, i.e. an implementer of PopulationListener.

Parameters:
listener - the listener of population change events.

size

int size()
Returns:
the number of populations managed by this system.