A trivial SMART operator will be explained here as a foothold for the imagination. It is important to understand that the example pictured in Figure 3.2 is smaller than a typical SMART recombination operator by almost two orders of magnitude. In addition this example program is readable and concise in a way that never happens under normal evolution conditions. To begin to understand the SMART recombination example pictured in Figure 3.2, let us start by writing its operation in English pseudo-code:
Figure 3.2: An extremely simplified SMART operator program example.
The next question is, what does this really do? The answer is:
Keep picking random subset of for until more than half the children of nodes in are in . In other words, keeping picking subsets for until it passes the 50% intra-connectivity threshold (i.e. the point at which more than half the outgoing arcs from nodes in the set point back to nodes in the set).
The branch-decision function can, in general, be different for each node. For the sake of simplicity, Nodes 1 through 8 all have the same function (see Figure 3.2). This function, for all eight nodes, will always pick as the control transfer arc. Neither the number of arcs, where they point, nor the branch-decision function need exhibit this kind of regularity. Now here is a blow-by-blow account of each of the ten nodes and what they actually do:
Node 0: This is the stop node. Generally, when PADO reaches this node, the PADO program's current state is recorded and then, providing the time-threshold has not yet been reached, the program is restated at node 1 (q). In this case, the stop node happens to executes Special Action 13 (SA-13), which signals that the SMART operator has made its choice and need not be restarted.
Node 1: This is the start node. It places a 0 on the program's argument stack.
Node 2: This node executes Special Action 8 (SA-8). This action takes one argument V and sets the SMART recombination operator's to a random subset of nodes in . In this case V will be 0 since that is what is on top of the argument stack.
Node 3: This node places a 0 on the argument stack.
Node 4: This node places a 1 on the argument stack.
Node 5: This node places a 1 on the argument stack.
Node 6: This node executes SA-11. SA-11 takes three parameters (Z,Y,V) ( ) and returns the number of arcs whose source node is in (if Y>0) or out of (if Y=0) and whose destination node is in (if Z>0) or out of (if Z=0). Generally, this action can measure the intra- or inter-connectivity of or . In this case Y and Z are 1 and V is 0, so the effect of this action is to place on the argument stack the number of arcs with source nodes in and destination nodes in .
Node 7: This node places a 0 on the argument stack.
Node 8: This node executes SA-9. SA-9 takes one parameter (V) and returns the number of nodes in . In this case, 0 is on the top of the argument stack, so this action puts the number of nodes in onto the argument stack.
Node 9: This node executes the standard PADO action ``less-than'', which takes the top two values off the argument stack (X,Y) and puts a 1 on the argument stack if X is less than Y and a 0 otherwise. In this case, the top two values on the argument stack are the results of the actions from nodes 6 and 8. This node's branch-decision function is ``If RESULT > 0 then else '' (see Figure 3.2). RESULT is the result of this node's action.
When this SMART operator program finishes, the environment will take (the nodes to be exchanged) and (the nodes to be exchanged, left empty in this example) and exchange and recombine them as described in section 3.4.