Package Bio :: Package GA :: Module Evolver :: Class GenerationEvolver
[hide private]
[frames] | no frames]

Class GenerationEvolver

source code

object --+
         |
        GenerationEvolver

Evolve a population from generation to generation.

This implements a Generational GA, in which the population moves from generation to generation.

Instance Methods [hide private]
 
__init__(self, starting_population, selector)
Initialize the evolver.
source code
 
evolve(self, stopping_criteria)
Evolve the population through multiple generations.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, starting_population, selector)
(Constructor)

source code 

Initialize the evolver.

Arguments:
  • starting_population - An initial set of individuals to begin the evolution process from. This should be a list of Organism objects.
  • selector - A Selection object that implements selection, along with mutation and crossover to select a new population from a given population.
Overrides: object.__init__

evolve(self, stopping_criteria)

source code 

Evolve the population through multiple generations.

Arguments:
  • stopping_criteria - A function which, when passed the current individuals in the population, will determine when to stop the evolution process.
Returns:
  • The final evolved population.