jaga.control
Class NoisyIM

java.lang.Object
  |
  +--jaga.control.NoisyIM
All Implemented Interfaces:
InteractionModel, java.io.Serializable

public class NoisyIM
extends java.lang.Object
implements InteractionModel

Noisy Interaction Model should be used when fitness evaluations are to be noisy due to randomness in the environment and in the inputs. This class allows for the following:

Every generation a set of n seeds are generated, these will be used to configure the randomness of the evaluation, be it in the deployment or the experiment.

See Also:
Serialized Form

Field Summary
static int AVERAGE
           
static int MAXIMUM
           
static java.lang.String[] methodStrings
           
static int MINIMUM
           
 
Constructor Summary
NoisyIM(InteractionModel im, Deployment dep)
          Creates new NoisyIM
NoisyIM(InteractionModel im, Deployment dep, ConfigurableRandomInputExperiment cr)
          Creates new NoisyIM
NoisyIM(InteractionModel im, Deployment dep, ConfigurableRandomInputExperiment cr, int evals)
           
NoisyIM(InteractionModel im, Deployment dep, ConfigurableRandomInputExperiment cr, int evals, int method, boolean sameTrialsPerGeneration)
           
NoisyIM(InteractionModel im, Deployment dep, int evals)
           
 
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
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MINIMUM

public static final int MINIMUM

MAXIMUM

public static final int MAXIMUM

AVERAGE

public static final int AVERAGE

methodStrings

public static final java.lang.String[] methodStrings
Constructor Detail

NoisyIM

public NoisyIM(InteractionModel im,
               Deployment dep,
               int evals)

NoisyIM

public NoisyIM(InteractionModel im,
               Deployment dep,
               ConfigurableRandomInputExperiment cr,
               int evals,
               int method,
               boolean sameTrialsPerGeneration)

NoisyIM

public NoisyIM(InteractionModel im,
               Deployment dep,
               ConfigurableRandomInputExperiment cr,
               int evals)

NoisyIM

public NoisyIM(InteractionModel im,
               Deployment dep,
               ConfigurableRandomInputExperiment cr)
Creates new NoisyIM

NoisyIM

public NoisyIM(InteractionModel im,
               Deployment dep)
Creates new NoisyIM
Method Detail

evaluationsPerGeneration

public int evaluationsPerGeneration()
Specified by:
evaluationsPerGeneration in interface InteractionModel
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 albl
Specified by:
getNextIndividuals in interface InteractionModel

evaluate

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

evaluateNext

public double[] evaluateNext()
Should be same as calling evaluate( pickIndividuals() );
Specified by:
evaluateNext in interface InteractionModel
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. Next set of seeds is generated.
Specified by:
evolve in interface InteractionModel

getNumEvolvers

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

pickIndividuals

public Genotype[] pickIndividuals()
Specified by:
pickIndividuals in interface InteractionModel
Returns:
randomly picked individuals from the evolvers.

getPopulations

public Population[] getPopulations()
Specified by:
getPopulations in interface InteractionModel
Returns:
the current populations of the evolvers.

getSnapshotPainter

public islandev.SnapshotPainter getSnapshotPainter()
Specified by:
getSnapshotPainter in interface InteractionModel
Returns:
String displaying performance of fittest individual.

getMaxFitness

public Genotype getMaxFitness()
Specified by:
getMaxFitness in interface InteractionModel
Returns:
The maximum fitness a genotype can achieve. ie. when evolution will stop

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setPopulations

public void setPopulations(Population[] pops)
Sets the populations of the evolvers to be these
Specified by:
setPopulations in interface InteractionModel