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 printer ":" prototype mutator ":" prototype evaluator ":" prototype reproducer ":" prototype 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.