7. EN EL LIMES CON LA OTRA VIDA: LAS VISITAS 1 El deambular de las almas del Purgatorio
7.3. Los cruceiros
To summarise what we have observed from our examples, FGs are constructed of input nodes, function nodes and output nodes. Input nodes are labelled
"INPUT":x, (4.13)
where x is an integer corresponding to a specific input of the problem. So, if a problem requires solutions to accept 3 inputs, there will be input nodes labelled "INPUT":0, "INPUT":1 and "INPUT":2 in corresponding FGs. Input nodes have no outgoing edges. In general, if some node v is an input node, we assume the use of a function i(v) to recover the explicit input index implied by the integer x given in Equation 4.13.
Similarly, output nodes are labelled
"OUTPUT":x, (4.14)
where x is an integer corresponding to a specific output of the problem. If a problem requires solutions to produce 2 outputs, there will be exactly output nodes labelled "OUTPUT":0 and "OUTPUT":1 in corresponding FGs. Output nodes have exactly 1 outgoing edge. If an FG’s edges are explicitly ordered by labels, the single outgoing edge is given an index of 0. If an FG’s edges are explicitly recurrent/non-recurrent then the single outgoing edge is non- recurrent. If an FG’s edges are explicitly weighted, the single outgoing edge is given a weight that would imply an identity relation. For the simple neural network seen in Section 4.2.4, this weight was 1.0. In general, if some node v is an output node, we assume the use of a function o(v) to recover the explicit output index implied by the integer x given in Equation 4.14.
Function nodes are explicitly associated with functions from a function set F = {f1, f2, . . . fk}.
In this thesis we assume that all functions f ∈ F are multivariate functions over some domain D, although we do discuss an extension to FGs to support multiple types in Section 4.4. If FGs are being learned over a function set F then we assume the use of an arity function
a : F → N0, (4.15)
which associates each function fi ∈ F with a non-negative integer describing the number of
inputs that function expects. In the 1-bit adder seen in Section 4.2.1, all functions used 2 inputs, so for every function fi used in that example, a(fi) = 2. For the implementation of
Fibonacci sequence seen in Section 4.2.3, the 2-input multiplication function × had a(×) = 2 whereas the 1-input identity function id had a(id) = 1. We also assume the use of a naming function
p : F → Σ∗, (4.16)
where Σ∗corresponds to the set of strings available in GP 2. The naming function p associates each function with a unique name by which it can be referenced within an FG. Additionally, we assume that for any f ∈ F , p(f ) 6= "INPUT" and p(f ) 6= "OUTPUT" to avoid any confusion with input and output nodes. We also assume that naming is unique e.g. for any f1, f2∈ F
where f1 6= f2, it holds that p(f1) 6= p(f2). In the 1-bit adder seen in Section 4.2.1 we had
that for the NAND function ↑, p(↑) = "NAND". Each function node v is labelled
sv:xv, (4.17)
where svis a string equal to some p(f ) with f ∈ F . The string sv is then uniquely associating
a function node with a function from the function set. The integer xv is the bias associated
with the node. If no such integer is present, the bias is assumed to be 1 and all functions are assumed to ignore the bias in their semantics. In general we recover the function associated with a function node v with the function
f (v) = p−1(sv), (4.18)
where sv is the string component of the node v’s label as given in Equation 4.17. Biases are
given as integers in FGs but can be converted to any countable domain D with a function w rel : Z → D. In the simple neural network shown in Section 4.2.4, integers were converted to (a rational subset of) reals R with the function
w rel(x) = x
In general we recover the bias associated with a function node v with the function
b(v) = w rel(xv), (4.20)
where xv is the integer component of the node v’s label as given in Equation 4.17. A function
node must have exactly as many outgoing edges as their associated functions expect e.g. a function node v should have a(f (v)) edges. Each edge e is labelled
we:re:oe, (4.21)
where we ∈ Z, re ∈ {0, 1} and oe ∈ N0. The integer we is the integer weight associated
with an edge. Using the same w rel function as used with biases, we may be converted to
any countable domain. In general we recover the weight associated with an edge e with the function
w(e) = w rel(we), (4.22)
where weis the first integer component of the edge e’s label as given in Equation 4.21. If the
length of an edge e’s label is 2, 1 or 0, we assume that we = 1. The integer re determines
whether an edge is recurrent or non-recurrent. In general we recover whether a weight is recurrent with the function
r(e) = T rue, re= 1; F alse, re= 0, (4.23)
where re is the second integer component of the edge e’s label as given in Equation 4.21. If
the length of an edge e’s label is 2 then re is assumed to be the first integer component of
the label. If the length of an edge e’s label is 1 or 0 then re is assumed to be 0, e.g. e is
non-recurrent. The integer oeassigns to each edge a position in a total ordering. If a function
node v has k = a(f (v)) edges, e0, e1, . . . , ek−1, with values, oe0 = 0, oe1 = 1, . . . , oek−1 = k − 1. If the length of an edge e’s label is 2 or 1 then oeis assumed to be the last integer component
of the label. If the length of an edge e’s label is 0 then we assume that the corresponding function’s node associated function is commutative and that oe is assigned arbitrarily. In
general, the ordering index of an edge is recovered with the function
ord(e) = oe. (4.24)
We give a table summarising the functions we have introduced in Table 4.1, in the context of an FG, G = (V, E, s, t, lV, lE), function set F and general function domain D.
Symbol Trace Description
i i : V → N0 Returns the index associated with an input node.
o o : V → N0 Returns the index associated with an output node.
a a : F → N0 Returns the arity of a given function.
p p : F → Σ∗ Returns the unique name of a given function.
o o : V → N0 Returns the index associated with an output node.
f f : V → F Returns the function associated with a function node.
w rel w rel : Z → D Translates integer weights and biases to domain D.
b b : V → D Returns the bias associated with a function node,
translated to domain D.
w w : E → D Returns the weight associated with an edge.
r r : E → {T rue, F alse} Returns whether an edge is recurrent.
ord ord : E → N0 Returns the ordering index of an edge.
Table 4.1: Functions introduced in the description of FGs. These functions are given in the context of an FG G = (V, E, s, t, lV, lE), function set F and general function