simbad.picoevo.core.representation
Class Population

java.lang.Object
  extended by simbad.picoevo.core.representation.EvolutionObject
      extended by simbad.picoevo.core.representation.PopulationObject
          extended by simbad.picoevo.core.representation.Population
All Implemented Interfaces:
EvaluationInterface, EvolvableInterface, InitialisationInterface, PopulationInterface
Direct Known Subclasses:
Population_NEATPopulation, Population_SimplePopulation

public abstract class Population
extends PopulationObject
implements EvolvableInterface, InitialisationInterface, EvaluationInterface, PopulationInterface


Field Summary
protected  World _evolutionSpace
           
protected  int _generation
           
 
Fields inherited from class simbad.picoevo.core.representation.PopulationObject
_individualList
 
Fields inherited from class simbad.picoevo.core.representation.EvolutionObject
_memoryModule, _name, _variationOperatorList
 
Constructor Summary
Population(java.lang.String __populationName, World __evolutionSpace)
           
 
Method Summary
 void displayStatistics()
          Display population statistics (average and best individuals)
 int getGenerationNumber()
          get age of the population (i.e.
 World getOwner()
           
 ParameterSet getTemplate()
           
 void logStatistics()
          Log population statistics (average and best individuals) into a file (as given in the parameter set)
 void performEvaluation()
          Perform evaluation for the population (i.e.
 void performInitialisation()
          initialise the population
 void registerIndividual(Individual __ind)
          add the given individual to this population
 void renewPopulation(PopulationContainer __newPopulationContainer)
          Renew the population (i.e.
 void resetGenerationNumber()
          reset age of the population to zero
 void trace()
          Trace all individuals and (maybe) embedded elements for this population - no return value.
 
Methods inherited from class simbad.picoevo.core.representation.PopulationObject
displayInformation, getIndividual, getIndividualList, getPopulationSize, performVariations, reset
 
Methods inherited from class simbad.picoevo.core.representation.EvolutionObject
addOperator, addOperatorList, getDisplayInformation, getName, getVariationOperator, getVariationOperatorList, getVariationOperatorListSize, performLevelVariations, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface simbad.picoevo.core.evolution.EvolvableInterface
evolveOneStep
 
Methods inherited from interface simbad.picoevo.core.representation.PopulationInterface
getIndividual, getIndividualList, getPopulationSize, reset
 

Field Detail

_evolutionSpace

protected World _evolutionSpace

_generation

protected int _generation
Constructor Detail

Population

public Population(java.lang.String __populationName,
                  World __evolutionSpace)
Method Detail

getGenerationNumber

public int getGenerationNumber()
get age of the population (i.e. number of times it has been "renewed")


resetGenerationNumber

public void resetGenerationNumber()
reset age of the population to zero


registerIndividual

public void registerIndividual(Individual __ind)
add the given individual to this population

Specified by:
registerIndividual in interface PopulationInterface
Specified by:
registerIndividual in class PopulationObject

performInitialisation

public void performInitialisation()
initialise the population

Specified by:
performInitialisation in interface InitialisationInterface

performEvaluation

public void performEvaluation()
Perform evaluation for the population (i.e. call Individual.performEvaluation method for each individual)

Specified by:
performEvaluation in interface EvaluationInterface

renewPopulation

public final void renewPopulation(PopulationContainer __newPopulationContainer)
Renew the population (i.e. individuals list) by replacing it with the content of the target PopulationContainer. warning (1): after this call, the PopulationContainer passed as parameter does not contain any individuals to ensure single-referenced individuals warning (2): at the end of this method, we assume that there will be no pointer to any of the objects previously contained in _individualList so as to let all of these to be garbage collected - In practical, this means that the programmer should pay special attention to suppress any PopulationContainer and/or PopulationViewer that is not needed (set embedded IndividualList explicitly to "null" ) - e.g. The PopulationContainer parameter should be set to null after calling this method. dev note : final class for the moment.

Parameters:
newpop -

displayStatistics

public void displayStatistics()
Display population statistics (average and best individuals)


logStatistics

public void logStatistics()
Log population statistics (average and best individuals) into a file (as given in the parameter set)


getTemplate

public final ParameterSet getTemplate()

getOwner

public final World getOwner()

trace

public void trace()
Trace all individuals and (maybe) embedded elements for this population - no return value. By default, this method performs nothing -- however, descendant classes may overwrite this and related methods to perform user-specified code. e.g.: specific operator/terminal code for post-evaluation monitoring purpose.