ec.gp.koza
Class KozaSteadyStateStatistics

java.lang.Object
  |
  +--ec.Statistics
        |
        +--ec.gp.koza.KozaSteadyStateStatistics
All Implemented Interfaces:
Clique, java.io.Serializable, Setup, SteadyStateStatisticsForm

public class KozaSteadyStateStatistics
extends Statistics
implements SteadyStateStatisticsForm

A version of KozaSteadyStateStatistics intended to be used with steady-state evolution. Prints fitness information, one pseudogeneration (or pseudo-pseudogeneration) per line. If gather-full is true, then timing information, number of nodes and depths of trees, etc. are also given. No final statistics information is given.

Each line represents a single pseudogeneration. The first items on a line are always:

Then the following items appear, per subpopulation:

Parameters
base.file
String (a filename), or nonexistant (signifies stdout)
(the log for statistics)
base.gather-full
bool = true or false (default)
(should we full statistics on individuals (will run slower, though the slowness is due to off-line processing that won't mess up timings)

See Also:
Serialized Form

Field Summary
 Individual[] best_of_run_a
           
 boolean doFull
           
 long[][] genDepths
           
 long[][] genNodes
           
 long lastTime
           
 long lastUsage
           
static java.lang.String P_FULL
           
static java.lang.String P_STATISTICS_FILE
          log file parameter
 int statisticslog
          The Statistics' log
 long[] totalDepths
           
 long[] totalNodes
           
 
Fields inherited from class ec.Statistics
children, P_CHILD, P_NUMCHILDREN
 
Constructor Summary
KozaSteadyStateStatistics()
           
 
Method Summary
protected  void _nextPseudogenerationStatistics(EvolutionState state)
          Prints out the statistics, but does not end with a println -- this lets overriding methods print additional statistics on the same line
 void finalStatistics(EvolutionState state, int result)
          Called immediately after the run has completed.
 void individualsBredStatistics(SteadyStateEvolutionState state)
          Called each time new individuals are bred during the steady-state process.
 void individualsEvaluatedStatistics(SteadyStateEvolutionState state)
          Called each time new individuals are evaluated during the steady-state process.
 void nextPseudogenerationStatistics(SteadyStateEvolutionState state)
          Called each time one full pseudogeneration of individuals has been bred and evaluated.
 void postInitialEvaluationStatistics(SteadyStateEvolutionState state)
          Called immediately after the initial generation is evaluated.
 void postInitializationStatistics(EvolutionState state)
          Called each time new individuals are bred during the steady-state process.
 void preInitialEvaluationStatistics(SteadyStateEvolutionState state)
          Called immediately before the initial generation is evaluated.
 void preInitializationStatistics(EvolutionState state)
          Called immediately before population initialization occurs.
 void setup(EvolutionState state, Parameter base)
          Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.
 
Methods inherited from class ec.Statistics
postBreedingStatistics, postCheckpointStatistics, postEvaluationStatistics, postPostBreedingExchangeStatistics, postPreBreedingExchangeStatistics, preBreedingStatistics, preCheckpointStatistics, preEvaluationStatistics, prePostBreedingExchangeStatistics, prePreBreedingExchangeStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

P_FULL

public static final java.lang.String P_FULL

doFull

public boolean doFull

best_of_run_a

public Individual[] best_of_run_a

totalNodes

public long[] totalNodes

totalDepths

public long[] totalDepths

genNodes

public long[][] genNodes

genDepths

public long[][] genDepths

lastTime

public long lastTime

lastUsage

public long lastUsage

P_STATISTICS_FILE

public static final java.lang.String P_STATISTICS_FILE
log file parameter

statisticslog

public int statisticslog
The Statistics' log
Constructor Detail

KozaSteadyStateStatistics

public KozaSteadyStateStatistics()
Method Detail

setup

public void setup(EvolutionState state,
                  Parameter base)
Description copied from interface: Setup
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.
Overrides:
setup in class Statistics

preInitializationStatistics

public void preInitializationStatistics(EvolutionState state)
Called immediately before population initialization occurs.
Specified by:
preInitializationStatistics in interface SteadyStateStatisticsForm
Overrides:
preInitializationStatistics in class Statistics

preInitialEvaluationStatistics

public void preInitialEvaluationStatistics(SteadyStateEvolutionState state)
Called immediately before the initial generation is evaluated.
Specified by:
preInitialEvaluationStatistics in interface SteadyStateStatisticsForm

postInitialEvaluationStatistics

public void postInitialEvaluationStatistics(SteadyStateEvolutionState state)
Called immediately after the initial generation is evaluated.
Specified by:
postInitialEvaluationStatistics in interface SteadyStateStatisticsForm

postInitializationStatistics

public void postInitializationStatistics(EvolutionState state)
Called each time new individuals are bred during the steady-state process. You can look up the individuals in state.newIndividuals[]
Specified by:
postInitializationStatistics in interface SteadyStateStatisticsForm
Overrides:
postInitializationStatistics in class Statistics

_nextPseudogenerationStatistics

protected void _nextPseudogenerationStatistics(EvolutionState state)
Prints out the statistics, but does not end with a println -- this lets overriding methods print additional statistics on the same line

nextPseudogenerationStatistics

public void nextPseudogenerationStatistics(SteadyStateEvolutionState state)
Description copied from interface: SteadyStateStatisticsForm
Called each time one full pseudogeneration of individuals has been bred and evaluated. If the first total number of individuals is much larger than the pseudogeneration, then this may only get called once for the initial generation.
Specified by:
nextPseudogenerationStatistics in interface SteadyStateStatisticsForm

individualsBredStatistics

public void individualsBredStatistics(SteadyStateEvolutionState state)
Description copied from interface: SteadyStateStatisticsForm
Called each time new individuals are bred during the steady-state process. You can look up the individuals in state.newIndividuals[]
Specified by:
individualsBredStatistics in interface SteadyStateStatisticsForm

individualsEvaluatedStatistics

public void individualsEvaluatedStatistics(SteadyStateEvolutionState state)
Description copied from interface: SteadyStateStatisticsForm
Called each time new individuals are evaluated during the steady-state process. You can look up the individuals in state.newIndividuals[]
Specified by:
individualsEvaluatedStatistics in interface SteadyStateStatisticsForm

finalStatistics

public void finalStatistics(EvolutionState state,
                            int result)
Description copied from interface: SteadyStateStatisticsForm
Called immediately after the run has completed. result is either state.R_FAILURE, indicating that an ideal individual was not found, or state.R_SUCCESS, indicating that an ideal individual was found.
Specified by:
finalStatistics in interface SteadyStateStatisticsForm
Overrides:
finalStatistics in class Statistics