net.sf.amiba.evolve
Class EvolutionEngine<T>

Object
  extended by EvolutionEngine<T>

public class EvolutionEngine<T>
extends Object

The main class that will drive the process of evolution with the help of other classes. For the sake of configurability and code maintainability, it delegates its tasks to various sub-Engines.

Author:
juber patel

Constructor Summary
EvolutionEngine(File configFile, AmibaFactory<T> factory)
          Use the configuration file and the AmibaFactory to build this engine.
 
Method Summary
 Population<T> evolve()
          evolve the defualt FixedNumberPopulation
 void evolve(Population<T> population)
          evolve the given population
static void main(String[] args)
           
 boolean stopEvolution(Population<T> population)
          a hook to halt the process of evolution midway.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvolutionEngine

public EvolutionEngine(File configFile,
                       AmibaFactory<T> factory)
                throws AmibaException
Use the configuration file and the AmibaFactory to build this engine. While the config file contains the configurable options (eg. mutation rate) the factory contains possible custom components (eg. grammar to be used in the chromosome)

Parameters:
configFile - the configuration file
factory - the factory
Throws:
AmibaException
Method Detail

evolve

public Population<T> evolve()
                     throws AmibaException
evolve the defualt FixedNumberPopulation

Throws:
AmibaException

evolve

public void evolve(Population<T> population)
            throws AmibaException
evolve the given population

Parameters:
population -
Throws:
AmibaException

stopEvolution

public boolean stopEvolution(Population<T> population)
a hook to halt the process of evolution midway. the user should override this method if special termination is desired, eg. in case of getting a satisfactory Individual or while using fitness cases to judge the fitness

Parameters:
population -
Returns:
true if evolution should be stopped, otherwise false

main

public static void main(String[] args)