jaga.control
Interface InteractionModel

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
JobInterviewIM, NoisyPIM, StandardInteractionModel, NoisyIM, ShellIM

public interface InteractionModel
extends java.io.Serializable

Used to control and manage flow of information between Genotypes produced by the Evolve class, the inputs & fitnesses produced by the Experiment and the outputs produced by the Deployment.

Multiple Evolve and Experiment classes are allowed so single evolution or co-evolution strategies with abritrary interactions can be implemented.


Method Summary
 double[] evaluate(Genotype[] inds)
          Evaluates these individuals using the deployment and experiments and procedure of this model.
 double[] evaluateNext()
          Should be same as calling evaluate( pickIndividuals() );
 int evaluationsPerGeneration()
           
 void evolve()
          Evolves to the next generation of all/some of the populations involved.
 Genotype getMaxFitness()
           
 Genotype[] getNextIndividuals()
          Picks a number of individuals to be evaluated next.
 int getNumEvolvers()
           
 Population[] getPopulations()
           
 islandev.SnapshotPainter getSnapshotPainter()
           
 Genotype[] pickIndividuals()
           
 void setPopulations(Population[] pops)
          Sets the populations of the evolvers to be these
 

Method Detail

evaluationsPerGeneration

public int evaluationsPerGeneration()
Returns:
the number of evaluations per generation to be performed

getNextIndividuals

public Genotype[] getNextIndividuals()
Picks a number of individuals to be evaluated next. These individuals can be from any of the populations as long as there is a standard interface between the caller and this method implementation as to where each come from. Example: may be first element a pac-man, and five others all ghosts..

evaluate

public double[] evaluate(Genotype[] inds)
Evaluates these individuals using the deployment and experiments and procedure of this model.
Returns:
an array of the fitnesses of the individuals.

evaluateNext

public double[] evaluateNext()
Should be same as calling evaluate( pickIndividuals() );
Returns:
an array of the fitnesses of the individuals.

evolve

public void evolve()
Evolves to the next generation of all/some of the populations involved.

getNumEvolvers

public int getNumEvolvers()
Returns:
the number of evolvers (ie. populations) acting in this model.

pickIndividuals

public Genotype[] pickIndividuals()
Returns:
randomly picked individuals from the evolvers.

getPopulations

public Population[] getPopulations()
Returns:
the current populations of the evolvers.

getSnapshotPainter

public islandev.SnapshotPainter getSnapshotPainter()
Returns:
String displaying performance of fittest individual.

getMaxFitness

public Genotype getMaxFitness()
Returns:
A Genotype with the maximum fitness a genotype can achieve (ie. when evolution will stop). This may have fitness and properties too.

setPopulations

public void setPopulations(Population[] pops)
Sets the populations of the evolvers to be these