next up previous
Next: Genetic Algorithm Definition Up: The Language Previous: Chromosome Definition

Population Definition

The DARWIN population construct is used to holds an array of chromosomes and all the needed statistics information for performing selection and reproduction. For a population construct to be legal, it should contain exactly one one-dimensional array of chromosomes. The array notation, informs the DARWIN cross-compiler about the type of population members and the population size.

The population has the selector, reproducer, initializer, evaluator and printer as its moderator set.

The population definition syntax is as follows :

pop_typedef ::= "population" id
    "{" memb_decls "}"
    pop_moderators ";"
pop_moderator ::= initializer ":" prototype
  $\vert$ printer ":" prototype
  $\vert$ mutator ":" prototype
  $\vert$ evaluator ":" prototype
  $\vert$ reproducer ":" prototype
  $\vert$ selector ":" prototype

Continuing the implementation of our sample problem, we define a population of 100 chromosomes as follows :

population Pop
{
   TRectangles individuals[100];
};

The DARWIN Population definition is used to specify population parameters and provide means for statistics keeping. In its simplest form the population specifies its associated chromosome and the population count. This is accomplished by defining an one-dimensional array member of chromosome type. The population moderator set is consisting of initializer, evaluator, selection, reproducer and printer. By default, an array member to store fitness scores of the individuals of the population is added to the population.

The population initializer
clears the statistics array, creates the population members and calls their chromosome initializers. This initializer is called by the genetic algorithm when it first starts.

The population evaluator
is responsible for calling the evaluators of all the chromosomes present in it and stores the results in the statistics array. In addition, this moderator is responsible for performing any necessary scaling of the fitness values. The default evaluator does not perform scaling, but it records the minimum, maximum and average fitness values.

The population selector
moderator implements the selection strategy of the population. This moderator is called by the genetic algorithm during the reproduction of the population. The selection moderator is used to choose a parent according to some favoring criteria. The default selector uses roulette wheel selection strategy.

The population reproducer
moderator is used to generate an offspring population from the present one. The default reproducer uses the population selector to select two parents, then these parents undergo crossover to generate two children. This is repeated until an offspring population of the same size is reached.

The population printer
moderator is used to print the contents of the population in a user readable form.


next up previous
Next: Genetic Algorithm Definition Up: The Language Previous: Chromosome Definition
Gokturk Ucoluk 2003-09-15