modea.Recombination module

This Module contains a collection of Recombination operators

A Recombination operator accepts (mu) individuals and returns (lambda) created individuals that are to form the new population

modea.Recombination.MIES_recombine(pop, param)

Returns a new set of individuals whose genotype is determined according to the Mixed-Integer ES by Rui Li.

Parameters:
  • pop – The population to be recombined
  • paramParameters object
Returns:

A list of lambda individuals, with as genotype the weighted average of the given population.

modea.Recombination.onePlusOne(pop, param)

Utility function for 1+1 ES strategies where the recombination is merely a copy

Parameters:
  • pop – The population to be recombined
  • paramParameters object
Returns:

A copy of the first individual in the given population

modea.Recombination.onePointCrossover(ind_a, ind_b)

Perform one-point crossover between two individuals.

Parameters:
  • ind_a – An individual
  • ind_b – Another individual
Returns:

The original individuals, whose genotype has been modified inline

modea.Recombination.random(pop, param)

Create a new population by selecting random parents from the given population. To be used when no actual recombination occurs

Parameters:
  • pop – The population to be recombined
  • paramParameters object
Returns:

A list of lambda individuals, each a copy of a randomly chosen individual from the population

modea.Recombination.weighted(pop, param)

Returns a new set of individuals whose genotype is initialized to the weighted average of that of the given population, using the weights stored in the Parameters object. Set weights to 1/n to simply use the arithmetic mean

Parameters:
  • pop – The population to be recombined
  • paramParameters object, of which param.weights will be used to calculate the weighted average
Returns:

A list of lambda individuals, with as genotype the weighted average of the given population.