EdGarrity / SOS

Search for an Optimum Solution
1 stars 0 forks source link

Add the Ultra Operator #90

Open EdGarrity opened 4 years ago

EdGarrity commented 4 years ago

"ULTRA,” which stands for “Uniform Linear Transforma-tion with Repair and Alternation,” is a new genetic operator that takes two parent programs and combines them in a way that makes each part of each program equally likely to appear in the resulting child and equally likely to be modified by mutation (See "Evolving a Digital Multiplier with the PushGP Genetic Programming System" by Thomas Helmuth). ULTRA acts on linear structures while including each element of the structures with uniform probability. It was motivated by theoretical considerations regarding relations between program size, function, and mutability, and by analogies to the mechanics of mutation and crossover in biological (linear) genomes.

The ULTRA operator takes two parent programs and produces from them a single child program. It first traverses the linearized parents, building the child as a linear sequence of tokens taken from the parents. This traversal begins by adding the first token of the first parent to the child. After this first step, and after each further token is added to the child sequence, there is a fixed probability of alternating between parents; that is, of moving the traversal index to an index in the other parent program. The probability of alternating at any given index is specified as the “alternation rate.” When alternating between parents, the index within the new parent from which the next token will be taken is subjected to Gaussian noise and may change to a higher or lower index; the standard deviation of the noise is given by the “alignment deviation” parameter. After deciding whether to alternate or not, the next token from the current parent is added to the child, and the traversal index is incremented. The construction of the child terminates when the token index exceeds the size of the current parent or when it exceeds the maximum program size.

After the child sequence has been created through traversal of the parents, it is subjected to a uniform mutation during which each token has uniform probability of being deleted or replaced by any other token, including all literals and instructions used for the problem and open and close parentheses. The probability of any one token being mutated is given by the “mutation rate” parameter. In the absence of mutations or alterations, ULTRA would simply traverse the first parent and copy all of its tokens to the child; the child would then be a clone of the first parent.