org.jscience.computing.ai.evolutionary
Interface Evolvable

All Superinterfaces:
java.lang.Comparable
All Known Implementing Classes:
EvoFeedForwardNN

public interface Evolvable
extends java.lang.Comparable

This interface allows any class to be evolvable by org.jscience.computing.ai.evolutionary.GeneticAlgorithm. It is derived from Comparable so they classes can be efficiently sorted by the GA. Invariably, this is done by fitness.


Method Summary
 void calculateFitness()
          Calculate the fitness of this object.
 double getFitness()
          Return the fitness of this object.
 Evolvable mate(Evolvable partner)
          Mate with another Evolvable type.
 void mutate()
          Mutate the class data.
 void randomInitialize()
          Initialize the class to random values.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

randomInitialize

void randomInitialize()
Initialize the class to random values. This allows for a default constructor or initializor, as well as the random initializor required for the genetic algorithm.


mutate

void mutate()
Mutate the class data.


mate

Evolvable mate(Evolvable partner)
Mate with another Evolvable type. It is entirely up to the class implementator how to implement the mating; one-point, two-point crossover etc.

Parameters:
partner - the other mate.
Returns:
the child of this and partner.

calculateFitness

void calculateFitness()
Calculate the fitness of this object.


getFitness

double getFitness()
Return the fitness of this object.

Returns:
the fitness.