biopython v1.71.0 Bio.GA.Organism

Deal with an Organism in a Genetic Algorithm population.

Link to this section Summary

Functions

Generate a population given a function to create genomes

Generate a population of individuals with randomly set genomes

Link to this section Functions

Link to this function function_population()

Generate a population given a function to create genomes.

Arguments:

  • 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.
  • num_organisms - The number of individuals we want in the population.
  • fitness_calculator — A function that will calculate the fitness of the organism when given the organisms genome.
Link to this function random_population()

Generate a population of individuals with randomly set genomes.

Arguments:

  • genome_alphabet — An Alphabet object describing all of the possible letters that could potentially be in the genome of an organism.
  • genome_size — The size of each organisms genome.
  • num_organism — The number of organisms we want in the population.
  • fitness_calculator — A function that will calculate the fitness of the organism when given the organisms genome.