• No results found

Graph-based Approaches

In document Global Optimization Algorithms (Page 197-200)

4.3 (Standard) Tree Genomes

4.7 Graph-based Approaches

4.7 Graph-based Approaches

In this section, we will discuss some Genetic Programming approaches that are based on graphs rather than on trees or linear sequences of instructions.

4.7.1 Parallel Algorithm Discovery and Orchestration

Parallel Algorithm Discovery and Orchestration (PADO) is a Genetic Programming method introduced by Teller and Veloso [1164, 996] in the mid-1990s. In their CEC paper [997]

and their 1996 book chapter [998], they describe the graph-structure of their approach as sketched in Figure 4.22. A PADO program is a directed graph of up to n nodes, where

start

end

Lib1 ADF

Lib37 ADF

Main Program

start

end

ADF Lib13

Private ADF(s) Indexed Memory

Fig. 4.22: The general structure of a Parallel Algorithm Discovery and Orchestration pro-gram.

each node may have as many as n outgoing arcs which define the possible control flows. A node consists of two parts: and action and a branching decision. The programs used indexed memory and an implicitly accessed stack. The actions pop their inputs from the stack and place their outputs onto it. After a node’s action has been executed, the branching decision function is used to determine over which of the outgoing arcs the control will be transferred.

It can access the stack, the memory, and the action type of the previous node in order to make that decision.

A program in the PADO-syntax has a start node which will initially receive the control token and an end node which terminates the program after its attached action has been performed. Furthermore, the actions may call functions from a library and automatically defined functions (ADFs). These ADFs basically have same structure as the main program and can also invoke themselves recursively.

As actions, PADO provides algebraic primitives like +, -, *, /, NOT, MAX, and MIN; the memory instructionsREAD andWRITE; branching primitives likeIF-THEN-ELSEandPIFTE (al-ternative with a randomized condition); as well as constants and some domaspecific in-structions. Furthermore, actions may invoke more complex library functions or ADFs. An action takes its arguments from the stack and also pushes its results back onto it. The action 6, for instance, pushes 6 on the stack whereas theWRITEaction pops two values, v1 and v2, from it and pushes the value of the memory cell indexed by v2 before storing v1 at this location.

In PADO, so-called SMART operators are used for mutation and recombination which co-evolve with the main population as described in [1165, 998].

4.7.2 Parallel Distributed Genetic Programming

Parallel Distributed Genetic Programming(PDGP) is a method for growing programs in the form of graphs that has been developed by Poli [1166, 1167, 1168, 1169] in the mid 1990s. In

PDGP, a graph is represented as a fixed-size, n-dimensional grid. The nodes of the grid are labeled with operations, functions, or references to variables. Except for the latter case, they are connected to their inputs with directed links. Both, the labels as well as the connections in the grid are subject to evolution.

max

We already have elaborately discussed how we can express mathematical terms as trees.

Fig. 4.23.aillustrates such a function tree. Using a directed graph, as outlined inFig. 4.23.b, we can retrieve a more compact representation of the same term by reusing the expression x∗ y. Evolving such graphs is the goal of PDGP. Therefore, a grid structure needs to be defined first. InFig. 4.23.c, we have settled for a two dimensional 4*3 grid. Additionally, we add a row at the top containing one cell for each output of the program. We can easily fill the graph fromFig. 4.23.binto this grid. This leaves some nodes unoccupied. If we assume that Fig. 4.23.crepresents a solution grown by this Genetic Programming approach, these nodes would be labeled with some unused expressions and would somehow be connected without any influence on the result of the program. Such an arbitrary configuration of inactive nodes (or introns and links is sketched in light gray inFig. 4.23.c. The nodes which have influence on the result of the program, i. e., those which are connected to an output node directly or indirectly, are called active nodes.

We may impose restrictions on the connectivity of PDGP graphs. For instance, we can define that each row must only be connected to its predecessor in order to build layered feed-forward networks. We can transform any given parallel distributed program (i. e., any given acyclic graph) into such a layered network if we additionally provide the identity function so pass-through nodes can evolve as shown in Fig. 4.23.c. Furthermore, we could also attach weights to the links between the nodes and make them also subject to evolution.

This way, we can also grow artificial neural networks [1170]. However, we can as well do without any form of restrictions for the connectivity and may allow backward connections in the programs, depending on the application.

An interesting part of PDGP is how the programs are executed. Principally, it allows for a great proportion of parallelism. Coming back to the example outlinedFig. 4.23.c, the values of the leaf nodes could be computed in parallel, as well those of the pass-through and the addition node.

4.7 Graph-based Approaches 181 Genetic Operations

For this new program representation, novel genetic operations are needed.

Creation

Similar to the grow and full methods for creating trees in Standard Genetic Programming introduced in Section 4.3.1 on page 144, it is possible to obtain balanced or unbalanced graphs/trees in PDGP, depending whether we allow variables and constants to occur any-where in the program or only at a given, predetermined depth.

Crossover

SAAN Crossover The basic recombination operation in PDGP is Sub-graph Active-Active Node (SAAN) crossover. The idea of SAAN crossover is that active sub-graphs represent functional units which should be combined in different ways in order to explore new, useful constellations. It proceeds as follows:

1. Select a random active node in each parent, the crossover points.

2. Extract the sub-graph that contains all the (active) nodes that influence the result of the node marking the crossover point in the first parent.

3. Insert this sub-graph at the crossover point in the second parent. If its x-coordinate is incompatible and some nodes of the sub-graph would be outside the grid, wrap it so that these nodes are placed on the other side of the offspring.

Of course, we have to ensure that the depths of the crossover points are compatible and no nodes of the sub-graph would “hang” below the grid in the offspring. This can be achieved by first selecting the crossover point in the first parent and then choosing a compatible crossover point in the second parent.

SSAAN Crossover The Sub-Sub-Graph Active-Active Node (SSAAN) Crossover method works essentially the same way, with one exception: it disregards crossover point depth compatibility. It may now happen that we want to insert a sub-graph into an offspring at a point where it does not fit because it is too long. Here we make use of the simple fact that the lowest row in a PDGP graph always is filled with variables and constants only – functions cannot occur there because otherwise, no arguments could be connected to them.

Hence, we can cut the overhanging nodes of the sub-graph and connect the now unsatisfied arguments at second-to-last row with the nodes in the last row of the second parent. Of course, we have to pay special attention where to cut the sub-graph: terminal nodes that would be copied to the last row of the offspring can remain in it, functions cannot.

SSIAN Sub-Sub-Graph Inactive-Active Node (SSIAN) Crossover works exactly like SSAAN crossover except that the crossover point in the first parent is chosen amongst both, active and inactive nodes.

Mutation

We can extend the mutation operation from Standard Genetic Programming easily to PDGP by creating new, random graphs and insert them at random points into the offspring. In the context of PDGP, this is called global mutation and can be achieved by creating a completely new graph and performing crossover with an existing one.

Furthermore, link mutation is introduced as an operation that performs simple local changes on the connection topology of the graphs.

ADLs

Similar to Standard Genetic Programming, we can also introduce automatically defined functions41 in PDGP by extending the function set with a new symbol which then executes an (also evolved) subprogram when being evaluated. Automatically Defined Links, ADLs, work similarly, except that a link is annotated with the subprogram-invoking symbol [1171, 1172].

4.7.3 Genetic Network Programming

Genetic Network Programming (GNP) is a Genetic Programming technique introduced by Katagiri et al. [1173] at the 2001 CEC conference in Seoul [1173, 1174, 1175, 1176]. In GNP, programs are represented as directed graphs called networks which consist of three types of nodes: the start node, judgment nodes and processing nodes. A processing nodes executes an action from a predefined set of actions P and can have exactly on outgoing connection to a successor node. Judgment nodes may have multiple outgoing connections and have one expression from the set of possible judgment decisions J attached to them with which they make this decision. As in the example illustrated inFigure 4.24, each node in the network is

start

Fig. 4.24: An example program in Genetic Network Programming syntax.

represented by two genes, a node gene and a connection gene. The node gene consists of two values, the node type (which is 0 for processing nodes and 1 for judgment nodes) and the function index. For processing nodes, the function index can take on the values from 0 to

|P |−1 and for judgment nodes, it is in 0..|J|−1. These values identify the action or decision function to be executed whenever the node receives the control token. In the connection gene, the indices of the other nodes the node is connected to are stored. For processing nodes, this list has exactly one entry, for judgment nodes there always are at least two outgoing connections (inFigure 4.24, there are exactly two). Notice that programs can be interpreted in this representation directly without needing an explicit genotype-phenotype mapping.

Crossover is performed by randomly exchanging notes (and their attached connections) between the parent networks and mutation randomly changes the connections. Murata and

41More information on ADFs can be found inSection 4.3.9 on page 149.

In document Global Optimization Algorithms (Page 197-200)