jaga.evolve
Interface Evolver

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
StandardEvolver

public interface Evolver
extends java.io.Serializable

An interface for creating GA engines which may be generational or not.


Method Summary
 void evolve()
          runs the evolution process on the population performing: selection, recombination & mutation and elitism
 int getGenerations()
          returns an int whose value is the number of times the evolve() method was called after the latest poolOfMud() call.
 Genotype getGenotype(int i)
          gets the genotype at index i in the population.
 Population getPopulation()
          returns the whole population (probably previous generation, not from one currently evolving)
 int getPopulationSize()
          returns the size of the population this Evolver deals with.
 void insertGenotype(Genotype g)
          inserts this genotype into the current population.
 Genotype pickGenotype()
          uses the evolver's selector to pick a genotype from the population (probably the previous generation, not from one currently evolving)
 void poolOfMud()
          Creates the initial random individuals by: 1) Getting a decent randoizer 2) generating [populationSize] random BitSets of length [genotypeLength]
 void setPopulation(Population pop)
          Sets this evolvers current generation population to this one.
 

Method Detail

poolOfMud

public void poolOfMud()
Creates the initial random individuals by: 1) Getting a decent randoizer 2) generating [populationSize] random BitSets of length [genotypeLength]

evolve

public void evolve()
runs the evolution process on the population performing: selection, recombination & mutation and elitism

getPopulationSize

public int getPopulationSize()
returns the size of the population this Evolver deals with.

pickGenotype

public Genotype pickGenotype()
uses the evolver's selector to pick a genotype from the population (probably the previous generation, not from one currently evolving)

getGenotype

public Genotype getGenotype(int i)
gets the genotype at index i in the population.

getPopulation

public Population getPopulation()
returns the whole population (probably previous generation, not from one currently evolving)

insertGenotype

public void insertGenotype(Genotype g)
inserts this genotype into the current population. Could be an incoming migrator.

getGenerations

public int getGenerations()
returns an int whose value is the number of times the evolve() method was called after the latest poolOfMud() call.

setPopulation

public void setPopulation(Population pop)
Sets this evolvers current generation population to this one.