alogos.systems.ge.mutation

Mutation functions for GE.

Functions

int_replacement_by_probability(grammar, genotype, parameters=None)

Generate a new genotype by replacing int values by chance.

int_replacement_by_count(grammar, genotype, parameters=None)

Generate a new genotype by replacing a certain number of values.


Detailed object descriptions

alogos.systems.ge.mutation.int_replacement_by_probability(grammar, genotype, parameters=None)[source]

Generate a new genotype by replacing int values by chance.

Parameters:
  • grammar (Grammar)

  • genotype (Genotype)

  • parameters (dict or ParameterCollection, optional) – Following keyword-value pairs are considered by this function:

    • mutation_int_replacement_probability (int) : Probability of changing a codon.

    • codon_size (int) : Number of bits in a codon.

Returns:

genotype (Genotype) – Mutated genotype.

alogos.systems.ge.mutation.int_replacement_by_count(grammar, genotype, parameters=None)[source]

Generate a new genotype by replacing a certain number of values.

Parameters:
  • grammar (Grammar)

  • genotype (Genotype)

  • parameters (dict or ParameterCollection, optional) – Following keyword-value pairs are considered by this function:

    • mutation_int_replacement_count (int) : Total number of codons that shall be replaced.

    • codon_size (int) : Number of bits in a codon.

Returns:

genotype (Genotype) – Mutated genotype.