1 | # Copyright 2006 by Sean Luke and George Mason University
|
---|
2 | # Licensed under the Academic Free License version 3.0
|
---|
3 | # See the file "LICENSE" for more information
|
---|
4 |
|
---|
5 | parent.0 = ../../gp/koza/koza.params
|
---|
6 |
|
---|
7 | # First, we're gonna change the number of trees in
|
---|
8 | # the individual, to accommodate the ADFs
|
---|
9 | # Each of our three trees uses a different tree constraints,
|
---|
10 | # tc0, tc1, tc2
|
---|
11 |
|
---|
12 | pop.subpop.0.species.ind.numtrees = 2
|
---|
13 |
|
---|
14 | # "The result-producing branch" (Koza-II p. 84)
|
---|
15 | pop.subpop.0.species.ind.tree.0 = ec.gp.GPTree
|
---|
16 | pop.subpop.0.species.ind.tree.0.tc = tc0
|
---|
17 | # "ADF0 body" (Koza-II p. 84)
|
---|
18 | pop.subpop.0.species.ind.tree.1 = ec.gp.GPTree
|
---|
19 | pop.subpop.0.species.ind.tree.1.tc = tc1
|
---|
20 |
|
---|
21 |
|
---|
22 | # Now, let's define what tc0, and tc1 are.
|
---|
23 | # Each has a different function set, f0 and f1
|
---|
24 |
|
---|
25 | gp.tc.size = 2
|
---|
26 |
|
---|
27 | gp.tc.0 = ec.gp.GPTreeConstraints
|
---|
28 | gp.tc.0.name = tc0
|
---|
29 | gp.tc.0.fset = f0
|
---|
30 | gp.tc.0.returns = nil
|
---|
31 | gp.tc.0.init = ec.gp.koza.HalfBuilder
|
---|
32 | gp.tc.0.init.growp = 0.5
|
---|
33 | gp.tc.0.init.min = 2
|
---|
34 | gp.tc.0.init.max = 6
|
---|
35 |
|
---|
36 | gp.tc.1 = ec.gp.GPTreeConstraints
|
---|
37 | gp.tc.1.name = tc1
|
---|
38 | gp.tc.1.fset = f1
|
---|
39 | gp.tc.1.returns = nil
|
---|
40 | gp.tc.1.init = ec.gp.koza.HalfBuilder
|
---|
41 | gp.tc.1.init.growp = 0.5
|
---|
42 | gp.tc.1.init.min = 2
|
---|
43 | gp.tc.1.init.max = 6
|
---|
44 |
|
---|
45 |
|
---|
46 |
|
---|
47 |
|
---|
48 | # Now we define the two function sets f0 and f1
|
---|
49 |
|
---|
50 | gp.fs.size = 2
|
---|
51 | gp.fs.0 = ec.gp.GPFunctionSet
|
---|
52 | gp.fs.0.name = f0
|
---|
53 | gp.fs.0.size = 11
|
---|
54 | gp.fs.0.func.0 = ec.app.twobox.func.L0
|
---|
55 | gp.fs.0.func.0.nc = nc0
|
---|
56 | gp.fs.0.func.1 = ec.app.twobox.func.W0
|
---|
57 | gp.fs.0.func.1.nc = nc0
|
---|
58 | gp.fs.0.func.2 = ec.app.twobox.func.H0
|
---|
59 | gp.fs.0.func.2.nc = nc0
|
---|
60 | gp.fs.0.func.3 = ec.app.twobox.func.L1
|
---|
61 | gp.fs.0.func.3.nc = nc0
|
---|
62 | gp.fs.0.func.4 = ec.app.twobox.func.W1
|
---|
63 | gp.fs.0.func.4.nc = nc0
|
---|
64 | gp.fs.0.func.5 = ec.app.twobox.func.H1
|
---|
65 | gp.fs.0.func.5.nc = nc0
|
---|
66 | gp.fs.0.func.6 = ec.app.twobox.func.Add
|
---|
67 | gp.fs.0.func.6.nc = nc2
|
---|
68 | gp.fs.0.func.7 = ec.app.twobox.func.Sub
|
---|
69 | gp.fs.0.func.7.nc = nc2
|
---|
70 | gp.fs.0.func.8 = ec.app.twobox.func.Mul
|
---|
71 | gp.fs.0.func.8.nc = nc2
|
---|
72 | gp.fs.0.func.9 = ec.app.twobox.func.Div
|
---|
73 | gp.fs.0.func.9.nc = nc2
|
---|
74 | gp.fs.0.func.10 = ec.gp.ADF
|
---|
75 | # tree 1 (the "ADF0 body")
|
---|
76 | gp.fs.0.func.10.tree = 1
|
---|
77 | gp.fs.0.func.10.name = ADF0
|
---|
78 | gp.fs.0.func.10.nc = nc3
|
---|
79 |
|
---|
80 |
|
---|
81 |
|
---|
82 | gp.fs.1 = ec.gp.GPFunctionSet
|
---|
83 | gp.fs.1.name = f1
|
---|
84 | gp.fs.1.size = 7
|
---|
85 | gp.fs.1.func.0 = ec.app.twobox.func.Add
|
---|
86 | gp.fs.1.func.0.nc = nc2
|
---|
87 | gp.fs.1.func.1 = ec.app.twobox.func.Sub
|
---|
88 | gp.fs.1.func.1.nc = nc2
|
---|
89 | gp.fs.1.func.2 = ec.app.twobox.func.Mul
|
---|
90 | gp.fs.1.func.2.nc = nc2
|
---|
91 | gp.fs.1.func.3 = ec.app.twobox.func.Div
|
---|
92 | gp.fs.1.func.3.nc = nc2
|
---|
93 | gp.fs.1.func.4 = ec.gp.ADFArgument
|
---|
94 | gp.fs.1.func.4.arg = 0
|
---|
95 | gp.fs.1.func.4.name = ARG0
|
---|
96 | gp.fs.1.func.4.nc = nc0
|
---|
97 | gp.fs.1.func.5 = ec.gp.ADFArgument
|
---|
98 | gp.fs.1.func.5.arg = 1
|
---|
99 | gp.fs.1.func.5.name = ARG1
|
---|
100 | gp.fs.1.func.5.nc = nc0
|
---|
101 | gp.fs.1.func.6 = ec.gp.ADFArgument
|
---|
102 | gp.fs.1.func.6.arg = 2
|
---|
103 | gp.fs.1.func.6.name = ARG2
|
---|
104 | gp.fs.1.func.6.nc = nc0
|
---|
105 |
|
---|
106 |
|
---|
107 | #
|
---|
108 | # We specify our problem here
|
---|
109 | #
|
---|
110 |
|
---|
111 | eval.problem = ec.app.twobox.TwoBox
|
---|
112 | eval.problem.data = ec.app.twobox.TwoBoxData
|
---|
113 |
|
---|
114 | # Define our training set size and range here
|
---|
115 | eval.problem.size = 10
|
---|
116 | eval.problem.range = 10
|
---|