Logo Search packages:      
Sourcecode: python-biopython version File versions  Download package

def Bio::GA::Organism::function_population (   new_genome,
  num_organisms,
  fitness_calculator 
)

Generate a population given a function to create genomes

Arguments:

o new_genome - A function or callable object that will return
a genome that can be used for a new organism. This new genome
should be a MutableSeq object with a specified alphabet.

o num_organisms - The number of individuals we want in the population.

o fitness_calculator -- A funtion that will calculate the fitness
of the organism when given the organisms genome.

Definition at line 10 of file Organism.py.

00010                                                                       :
    """Generate a population given a function to create genomes

    Arguments:

    o new_genome - A function or callable object that will return
    a genome that can be used for a new organism. This new genome
    should be a MutableSeq object with a specified alphabet.

    o num_organisms - The number of individuals we want in the population.

    o fitness_calculator -- A funtion that will calculate the fitness
    of the organism when given the organisms genome.
    """
    all_orgs = []

    for org_num in range(num_organisms):
        cur_genome = new_genome()
        all_orgs.append(Organism(cur_genome, fitness_calculator))

    return all_orgs

def random_population(genome_alphabet, genome_size, num_organisms,


Generated by  Doxygen 1.6.0   Back to index