geneticengine.algorithms.gp.operators.umad

Variable-length mutation operators for linear genomes.

UMAD is Uniform Mutation by Addition and Deletion. SARMS is its self-adaptive-rate variant: the mutation rate is carried by the individual and perturbed before it is used to mutate the genome.

Attributes

T

Functions

umad_mutate(genome, random, gene_factory[, rate])

Apply size-neutral Uniform Mutation by Addition and Deletion.

sarms_mutate(genome, random, gene_factory[, rate, ...])

Mutate a genome and its rate using a log-normal self-adaptation step.

_standard_normal(random)

Generate a standard normal using only the RandomSource interface.

Module Contents

geneticengine.algorithms.gp.operators.umad.T
geneticengine.algorithms.gp.operators.umad.umad_mutate(genome, random, gene_factory, rate=0.1)

Apply size-neutral Uniform Mutation by Addition and Deletion.

For each original gene, floor(rate) genes are inserted plus one more with probability equal to the fractional part. Every gene in the augmented genome is then deleted independently with probability rate / (1 + rate), which preserves the expected genome size.

Parameters:
Return type:

list[T]

geneticengine.algorithms.gp.operators.umad.sarms_mutate(genome, random, gene_factory, rate=0.1, meta_rate=0.1, minimum_rate=1e-06, maximum_rate=10.0)

Mutate a genome and its rate using a log-normal self-adaptation step.

Parameters:
Return type:

tuple[list[T], float]

geneticengine.algorithms.gp.operators.umad._standard_normal(random)

Generate a standard normal using only the RandomSource interface.

Parameters:

random (geneticengine.random.sources.RandomSource)

Return type:

float