Package Bio :: Package GA :: Package Selection :: Module RouletteWheel :: Class RouletteWheelSelection
[show private | hide private]
[frames | no frames]

Class RouletteWheelSelection

AbstractSelection --+
                    |
                   RouletteWheelSelection


Roulette wheel selection proportional to individuals fitness.

The implements a roulette wheel selector that selects individuals from the population, and performs mutation and crossover on the selected individuals.
Method Summary
  __init__(self, mutator, crossover, repairer)
Initialize the selector.
  select(self, population)
Perform selection on the population based using a Roulette model.
    Inherited from AbstractSelection
  mutate_and_crossover(self, org_1, org_2)
Perform mutation and crossover on the two organisms.

Method Details

__init__(self, mutator, crossover, repairer=None)
(Constructor)

Initialize the selector.

Arguments:

o mutator -- A Mutation object which will perform mutation on an individual.

o crossover -- A Crossover object which will take two individuals and produce two new individuals which may have had crossover occur.

o repairer -- A class which can do repair on rearranged genomes to eliminate infeasible individuals. If set at None, so repair will be done.
Overrides:
Bio.GA.Selection.Abstract.AbstractSelection.__init__

select(self, population)

Perform selection on the population based using a Roulette model.

Arguments:

o population -- A population of organisms on which we will perform selection. The individuals are assumed to have fitness values which are due to their current genome.
Overrides:
Bio.GA.Selection.Abstract.AbstractSelection.select

Generated by Epydoc 2.1 on Thu Aug 10 20:01:14 2006 http://epydoc.sf.net