Page 194 - Data Science Algorithms in a Week
P. 194
178 Luis Rabelo, Edgar Gutierrez, Sayli Bhide et al.
The remainders are part of the parental programs not selected for crossover (Figure
4). The remainders are available in order to generate offspring. The first offspring can be
created by inserting the second parent’s crossover fragment into the first parent’s
remainder at the first parent’s crossover point (Figure 5). The second offspring can be
created by inserting the first parent’s crossover fragment into the second parent’s
remainder at the first second’s crossover point (Figure 5).
Figure 4: Remainders.
The new computer programs (offspring) are displayed in Figure 5. The first one is:
X/0.455Z + X + 1.75 and using a LISP S-expression (+ (/ X (* 0.455 Z)) (+ X 1.75)).
2
The second program is: 0.25XY and using a LISP S-expression (* (* Y X) (* 0.25 Y)).
Figure 5: Offspring programs developed from the previous parental programs (Figure 2), subprograms
selected for crossover (Figure 3), and the remainders (Figure 4).
It is important to require structure-preserving crossover. This is achieved by the
concept of invariant points. The parental programs in Figure 2 are point labeled trees and
some of those points can be defined of the invariant type. Therefore, structure-preserving
crossover never alters the invariant points of an overall program” (Koza, 1994). More
sophisticated structures can be implemented by using ontologies and constrained
programming.