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

Class Gene

Known Subclasses:
GACAGene, GPGene

Method Summary
  __init__(self, **args)
  __getitem__(self, val)
  __len__(self)
  copy(self)
  crossover(self, parent2, crossoverRate)
Depending on the crossoverRate, will return two new children created by crossing over the given parents at a single point, or will return copies of the parents.
  display(self)
  mutate(self, mutationRate)
Depending on the mutationRate, will mutate the genotype.

Method Details

crossover(self, parent2, crossoverRate)

Depending on the crossoverRate, will return two new children
created by crossing over the given parents at a single point,
or will return copies of the parents.

mutate(self, mutationRate)

Depending on the mutationRate, will mutate the genotype.

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