Trees | Index | Help |
---|
Package Bio :: Package GA :: Package Selection :: Module Tournament :: Class TournamentSelection |
|
AbstractSelection
--+
|
TournamentSelection
Method Summary | |
---|---|
Initialize the tournament selector. | |
Perform selection on the population using the Tournament model. | |
Comparison function for comparing two organisms. | |
Inherited from AbstractSelection | |
Perform mutation and crossover on the two organisms. |
Method Details |
---|
__init__(self,
mutator,
crossover,
repairer,
num_competitors=2)
|
select(self, population)Perform selection on the population using the Tournament 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 (ie. the fitness is up to date). |
_fitness_cmp(self, org_1, org_2)Comparison function for comparing two organisms. This just allows us to easily sort organisms by fitness. |
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Thu Aug 10 20:05:38 2006 | http://epydoc.sf.net |