Package pyrobot :: Package brain :: Module ga :: Class GA
[frames | no frames]

Class GA

Known Subclasses:
GACA

Class which defines everything needed to run a GA.

Method Summary
  __init__(self, population, **args)
  applyFitnessFunction(self)
  display(self)
  display_one(self, p)
  evolve(self)
  fitnessFunction(self, genePosition, **args)
  generate(self)
Iteratively creates a new population from the current population.
  getGenesFromFile(self, filename)
  initGenesFromFile(self, filename, sampleSize, mutate, full)
  initialize(self)
  isDone(self)
  loadFromFile(self, filename)
  loadGenesFromFile(self, filename)
  reInitialize(self)
  saveGenesToFile(self, filename, listOfPositions)
  saveToFile(self, filename)
  setSeed(self, value)

Method Details

generate(self)

Iteratively creates a new population from the current population.
Selects two parents, attempts to cross them, and then attempts to
mutate the resulting children.  The probability of these operations
occurring is determined by the crossoverRate and the mutationRate.
Overwrites the old population with the new population.

Generated by Epydoc 2.1 on Mon Jul 25 01:39:27 2005 http://epydoc.sf.net