com.anji.neat
Class Evolver

java.lang.Object
  extended bycom.anji.neat.Evolver
All Implemented Interfaces:
Configurable

public class Evolver
extends java.lang.Object
implements Configurable

Configures and performs an ANJI evolutionary run.

Author:
Philip Tucker

Field Summary
static java.lang.String FITNESS_FUNCTION_CLASS_KEY
          properties key, fitness function class
static java.lang.String FITNESS_TARGET_KEY
          properties key, target fitness value - after reaching this run will halt
static java.lang.String NUM_GENERATIONS_KEY
          properties key, # generations in run
 
Constructor Summary
Evolver()
          ctor; must call init() before using this object
 
Method Summary
 Chromosome getChamp()
           
 double getChampAdjustedFitness()
          Fitness of current champ, 0 ...
 double getTargetFitness()
           
 double getThresholdFitness()
           
 void init(Properties props)
          Construct new evolver with given properties.
static void main(java.lang.String[] args)
          Main program used to perform an evolutionary run.
 void run()
          Perform a single run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUM_GENERATIONS_KEY

public static final java.lang.String NUM_GENERATIONS_KEY
properties key, # generations in run

See Also:
Constant Field Values

FITNESS_FUNCTION_CLASS_KEY

public static final java.lang.String FITNESS_FUNCTION_CLASS_KEY
properties key, fitness function class

See Also:
Constant Field Values

FITNESS_TARGET_KEY

public static final java.lang.String FITNESS_TARGET_KEY
properties key, target fitness value - after reaching this run will halt

See Also:
Constant Field Values
Constructor Detail

Evolver

public Evolver()
ctor; must call init() before using this object

Method Detail

init

public void init(Properties props)
          throws java.lang.Exception
Construct new evolver with given properties. See Parameter Details for specific property settings.

Specified by:
init in interface Configurable
Parameters:
props - configuration parameters
Throws:
java.lang.Exception
See Also:
Configurable.init(com.anji.util.Properties)

run

public void run()
         throws java.lang.Exception
Perform a single run.

Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Throwable
Main program used to perform an evolutionary run.

Parameters:
args - command line arguments; args[0] used as properties file
Throws:
java.lang.Throwable

getChamp

public Chromosome getChamp()
Returns:
champion of last generation

getChampAdjustedFitness

public double getChampAdjustedFitness()
Fitness of current champ, 0 ... 1

Returns:
maximum fitness value

getTargetFitness

public double getTargetFitness()
Returns:
target fitness value, 0 ... 1

getThresholdFitness

public double getThresholdFitness()
Returns:
threshold fitness value, 0 ... 1