Numerical constants can be easily implemented in GEP
(Ferreira 2001). For that an additional domain Dc was created in the gene. Structurally, the Dc comes after the tail, has a length equal to
t, and is composed of the symbols used to represent the random constants. Therefore, another region with defined boundaries and its own alphabet is created in the gene.
For each gene the constants are randomly generated at the beginning of a run, but their circulation is guaranteed by the usual genetic operators of mutation, transposition, and recombination. Besides, a special mutation operator allows the permanent introduction of variation in the set of random constants and a domain specific IS transposition guarantees a more generalized shuffling of constants.
Consider the single-gene chromosome with an h = 11 (the Dc is shown in
blue):
01234567890123456789012345678901234 |
|
*?+?/*a-*/*a????a??a??a281983874486 |
(3.1) |
where “?” represents the random constants. The expression of this kind of chromosome is done exactly as before, giving:
Then the ?’s in the ET are replaced from left to right and from top to bottom by the symbols in Dc, obtaining:
The values corresponding to these symbols are kept in an array. For simplicity, the number represented by the numeral indicates the order in the array. For instance, for the 10 element
array:
A = {-2.829, 2.55, 2.399, 2.979, 2.442, 0.662, 1.797, -1.272, 2.826,
1.618} |
the chromosome (3.1) above gives:
|