propeller.variation

Propeller includes many kinds of genetic operators to create variation within the population. You can specify the rate of the variation genetic operators with the :variation map.

Variation

Propeller includes many kinds of genetic operators to create variation within the population. You can specify the rate of the variation genetic operators with the :variation map.

Crossover

Crossover genetic operators take two plushy representations of Push programs and exchange genetic material to create a new plushy.

Function Parameters Description
crossover plushy-a plushy-b Crosses over two individuals using uniform crossover, one Push instruction at a time. Pads shorter one from the end of the list of instructions.
tail-aligned-crossover plushy-a plushy-b Crosses over two individuals using uniform crossover, one Push instruction at a time. Pads shorter one from the beginning of the list of instructions.
diploid-crossover plushy-a plushy-b Crosses over two individuals using uniform crossover with pairs of Push instructions. Pads shorter one from the end of the list of instructions.
tail-aligned-diploid-crossover plushy-a plushy-b Crosses over two individuals using uniform crossover with pairs of Push instructions. Pads shorter one from the beginning of the list of instructions.

Addition, Deletion, Replacement, Flip

Addition, deletion, replacement, and flip genetic operators take a plushy and a rate of occurrence to create a new plushy.

Function Parameters Description
uniform-addition plushy instructions umad-rate Returns a plushy with new instructions possibly added before or after each existing instruction.
uniform-replacement plushy instructions replacement-rate Returns a plushy with new instructions possibly replacing existing instructions.
diploid-uniform-silent-replacement plushy instructions replacement-rate Returns a plushy with new instructions possibly replacing existing instructions, but only among the silent member of each pair.
diploid-uniform-addition plushy instructions umad-rate Returns a plushy with new instructions possibly added before or after each existing pair of instructions.
uniform-deletion plushy umad-rate Randomly deletes instructions from plushy at some rate.
diploid-uniform-deletion plushy flip-rate Randomly flips pairs in a diploid plushy at some rate.

Uniform Mutation by Addition and Deletion

Uniform Mutation by Addition and Deletion (UMAD) is a uniform mutation operator which first adds genes with some probability before or after every existing gene and then deletes random genes from the resulting genome. It has been found that UMAD, with relatively high rates of addition and deletion, results in significant increases in problem-solving performance on a range of program synthesis benchmark problems. When you run a problem in Propeller, you can specify the umad-rate to determine the frequency of addition and deletion.

:umad in the :variation map when running a problem will call uniform-addition and uniform-deletion with the umad-rate. Since uniform-addition and uniform-deletion are somewhat stochastic, you can use :rumad to ensure that the actual rates of addition and deletion are equal when mutating a genome.

New Individual

The function new-individual returns a new individual produced by selection and variation of individuals in the population based on the genetic operators provided in the :variation map.

crossover

(crossover plushy-a plushy-b)

Crosses over two individuals using uniform crossover, one Push instruction at a time. Pads shorter one from the end of the list of instructions.

diploid-crossover

(diploid-crossover plushy-a plushy-b)

Crosses over two individuals using uniform crossover with pairs of Push instructions. Pads shorter one from the end of the list of instructions.

diploid-flip

(diploid-flip plushy flip-rate)

Randomly flips pairs in a diploid plushy at some rate.

diploid-uniform-addition

(diploid-uniform-addition plushy instructions umad-rate)

Returns plushy with new instructions possibly added before or after each existing instruction.

diploid-uniform-deletion

(diploid-uniform-deletion plushy umad-rate)

Randomly deletes instructions from plushy at some rate.

diploid-uniform-silent-replacement

(diploid-uniform-silent-replacement plushy instructions replacement-rate)

Returns plushy with new instructions possibly replacing existing instructions, but only among the silent member of each pair.

new-individual

(new-individual pop argmap)

Returns a new individual produced by selection and variation of individuals in the population.

tail-aligned-crossover

(tail-aligned-crossover plushy-a plushy-b)

Crosses over two individuals using uniform crossover, one Push instruction at a time. Pads shorter one from the beginning of the list of instructions.

tail-aligned-diploid-crossover

(tail-aligned-diploid-crossover plushy-a plushy-b)

Crosses over two individuals using uniform crossover with pairs of Push instructions. Pads shorter one from the beginning of the list of instructions.

uniform-addition

(uniform-addition plushy instructions umad-rate)

Returns plushy with new instructions possibly added before or after each existing instruction.

uniform-deletion

(uniform-deletion plushy umad-rate)

Randomly deletes instructions from plushy at some rate.

uniform-replacement

(uniform-replacement plushy instructions replacement-rate)

Returns plushy with new instructions possibly replacing existing instructions.