Skip to content

Optimizers

cliff-bohm edited this page Jun 23, 2016 · 23 revisions

Optimizers are used in conjugation with single generation worlds (or within multi generation worlds). Optimizers take a population and use the organism scores generated by worlds generate a new population. Depending on the type of optimizer being used, the new generation may be all new organisms, or may consist of a mix of new organisms and organisms from previous generations.

###Asexual vs. Sexual Reproduction In addition to selecting the parent organisms, the optimizer also determines the reproduction method. Optimizers can also be designed to handle other elements such as sexual selection.

###Optimizer Types

GA
Selects a single parent organism at a time and then calls makeMutatedOffspringFrom() with this organism to produce a new organism which is added to a new population. To select each parent organism, a random value is generated. Then organisms are selected at random until one is selected who proportional (to the entire population) score is greater then the value.
Tournament
Selects a single parent organism at a time and then calls makeMutatedOffspringFrom() with this organism to produce a new organism which is added to a new population. To select each parent organism a number of organisms are selected at random from the population. From this selection, the organism with the highest score is used as the parent.
Tournament2
Selects a two parent organisms at a time and then calls makeMutatedOffspringFromMany() with these organisms to produce a new organism which is added to a new population. Although this is sexual reproduction, the gender of the organisms is ignored. The two parents are picked using the method defined in Tournament.
(multi objective)
not implemented yet
(lambda lambda)
not implemented yet
###Optimizer interface
void makeNextGeneration(vector<shared_ptr<Organism>> &population)

given a population (vector of organisms) with scores, update population with new organisms.

Clone this wiki locally