ec.gp.koza
Class KozaShortStatistics

java.lang.Object
  extended by ec.Statistics
      extended by ec.gp.koza.KozaShortStatistics
All Implemented Interfaces:
Setup, Singleton, java.io.Serializable
Direct Known Subclasses:
EdgeShortStatistics

public class KozaShortStatistics
extends Statistics

A Koza-style statistics generator, intended to be easily parseable with awk or other Unix tools. Prints fitness information, one generation (or pseudo-generation) 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 generation. The first items on a line are always:

Then the following items appear, per subpopulation:

Compressed files will be overridden on restart from checkpoint; uncompressed files will be appended on restart.

Parameters

base.gzip
boolean
(whether or not to compress the file (.gz suffix added)
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)

Version:
1.0
Author:
Sean Luke
See Also:
Serialized Form

Field Summary
 Individual[] best_of_run_a
           
 boolean doFull
           
 long lastTime
           
 long lastUsage
           
static java.lang.String P_COMPRESS
          compress?
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
KozaShortStatistics()
           
 
Method Summary
protected  void _postEvaluationStatistics(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 postBreedingStatistics(EvolutionState state)
          GENERATIONAL: Called immediately after breeding occurs.
 void postEvaluationStatistics(EvolutionState state)
          GENERATIONAL: Called immediately after evaluation occurs.
 void postInitializationStatistics(EvolutionState state)
          GENERATIONAL: Called immediately after population initialization occurs.
 void preBreedingStatistics(EvolutionState state)
          GENERATIONAL: Called immediately before breeding occurs.
 void preEvaluationStatistics(EvolutionState state)
          GENERATIONAL: Called immediately before evaluation occurs.
 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
finalStatistics, generationBoundaryStatistics, individualsBredStatistics, individualsEvaluatedStatistics, postCheckpointStatistics, postInitialEvaluationStatistics, postPostBreedingExchangeStatistics, postPreBreedingExchangeStatistics, preCheckpointStatistics, preInitialEvaluationStatistics, prePostBreedingExchangeStatistics, prePreBreedingExchangeStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

P_COMPRESS

public static final java.lang.String P_COMPRESS
compress?

See Also:
Constant Field Values

P_FULL

public static final java.lang.String P_FULL
See Also:
Constant Field Values

doFull

public boolean doFull

best_of_run_a

public Individual[] best_of_run_a

totalNodes

public long[] totalNodes

totalDepths

public long[] totalDepths

lastTime

public long lastTime

lastUsage

public long lastUsage

P_STATISTICS_FILE

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

See Also:
Constant Field Values

statisticslog

public int statisticslog
The Statistics' log

Constructor Detail

KozaShortStatistics

public KozaShortStatistics()
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.

Specified by:
setup in interface Setup
Overrides:
setup in class Statistics

preInitializationStatistics

public void preInitializationStatistics(EvolutionState state)
Description copied from class: Statistics
Called immediately before population initialization occurs.

Overrides:
preInitializationStatistics in class Statistics

postInitializationStatistics

public void postInitializationStatistics(EvolutionState state)
Description copied from class: Statistics
GENERATIONAL: Called immediately after population initialization occurs.

Overrides:
postInitializationStatistics in class Statistics

preBreedingStatistics

public void preBreedingStatistics(EvolutionState state)
Description copied from class: Statistics
GENERATIONAL: Called immediately before breeding occurs.

Overrides:
preBreedingStatistics in class Statistics

postBreedingStatistics

public void postBreedingStatistics(EvolutionState state)
Description copied from class: Statistics
GENERATIONAL: Called immediately after breeding occurs.

Overrides:
postBreedingStatistics in class Statistics

preEvaluationStatistics

public void preEvaluationStatistics(EvolutionState state)
Description copied from class: Statistics
GENERATIONAL: Called immediately before evaluation occurs.

Overrides:
preEvaluationStatistics in class Statistics

_postEvaluationStatistics

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


postEvaluationStatistics

public void postEvaluationStatistics(EvolutionState state)
Description copied from class: Statistics
GENERATIONAL: Called immediately after evaluation occurs.

Overrides:
postEvaluationStatistics in class Statistics