modea.Mutation module

This Module contains a collection of Mutation operators to be used in the ES-Framework

A Mutation operator mutates an Individual’s genotype inline, thus returning nothing.

modea.Mutation.CMAMutation(individual, param, sampler, threshold_convergence=False)

CMA mutation: x = x + (sigma * B*D*N(0,I))

Parameters:
  • individualFloatIndividual to be mutated
  • paramParameters object to store settings
  • samplerSampling module from which the random values should be drawn
  • threshold_convergence – Boolean: Should threshold convergence be applied. Default: False
modea.Mutation.MIES_Mutate(individual, param, options, num_options)

Self-adaptive mixed-integer mutation of the structure of an ES

Parameters:
  • individualMixedIntegerIndividual whose integer-part will be mutated
  • paramParameters object
  • options – List of tuples options with the number of tunable parameters per module
  • num_options – List num_options with the number of available modules per module position that are available to choose from
modea.Mutation.MIES_MutateDiscrete(individual, begin, end, u, num_options, options)

Mutate the discrete part of a Mixed-Integer representation

Parameters:
  • individual – The individual to mutate
  • begin – Start index of the discrete part of the individual’s representation
  • end – End index of the discrete part of the individual’s representation
  • u – A pre-determined random value from a Gaussian distribution
  • num_options – List num_options with the number of available modules per module position that are available to choose from
  • options – List of tuples options with the number of tunable parameters per module
Returns:

A boolean mask array to be used for further conditional mutations based on which modules are active

modea.Mutation.MIES_MutateFloats(conditional_mask, individual, begin, end, u, param)

Mutate the floating point part of a Mixed-Integer representation

Parameters:
  • conditional_mask – Conditional mask that determines which floating point values are allowed to mutate
  • individual – The individual to mutate
  • begin – Start index of the integer part of the individual’s representation
  • end – End index of the integer part of the individual’s representation
  • u – A pre-determined random value from a Gaussian distribution
  • paramParameters object
modea.Mutation.MIES_MutateIntegers(individual, begin, end, u, param)

Mutate the integer part of a Mixed-Integer representation

Parameters:
  • individual – The individual to mutate
  • begin – Start index of the integer part of the individual’s representation
  • end – End index of the integer part of the individual’s representation
  • u – A pre-determined random value from a Gaussian distribution
  • paramParameters object
modea.Mutation.adaptStepSize(individual)

Given the current individual, randomly determine a new step size offset that can be no greater than maxStepSize - baseStepSize

Parameters:individual – The FloatIndividual object whose step size should be adapted
modea.Mutation.addRandomOffset(individual, param, sampler)

Mutation 1: x = x + sigma*N(0,I)

Parameters:
  • individualFloatIndividual to be mutated
  • paramParameters object to store settings
  • samplerSampling module from which the random values should be drawn
modea.Mutation.mutateBitstring(individual)

Simple 1/n bit-flip mutation

Parameters:individualIndividual with a bit-string as genotype to undergo p=1/n mutation
modea.Mutation.mutateFloatList(individual, param, options)

Self-adaptive, uniformly random floating point mutation on the tunable parameters of an ES

Parameters:
  • individualMixedIntegerIndividual whose integer-part will be mutated
  • paramParameters object
  • options – List of tuples options with the number of tunable parameters per module
modea.Mutation.mutateIntList(individual, param, num_options_per_module)

Self-adaptive random integer mutation to mutate the structure of an ES

Parameters:
  • individualMixedIntegerIndividual whose integer-part will be mutated
  • paramParameters object
  • num_options_per_module – List num_options with the number of available modules per module position that are available to choose from
modea.Mutation.mutateMixedInteger(individual, param, options, num_options_per_module)

Self-adaptive mixed-integer mutation of the structure of an ES

Parameters:
  • individualMixedIntegerIndividual whose integer-part will be mutated
  • paramParameters object
  • options – List of tuples options with the number of tunable parameters per module
  • num_options_per_module – List num_options with the number of available modules per module position that are available to choose from