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 | # THIS IS A LONG FILE -- GO TO THE END IF YOU JUST
|
---|
8 | # WANT TO CHANGE THE "N" IN "N"-PARITY
|
---|
9 |
|
---|
10 | # First, we're gonna change the number of trees in
|
---|
11 | # the individual, to accommodate the ADFs
|
---|
12 | # Each of our three trees uses a different tree constraints,
|
---|
13 | # tc0, tc1, tc2
|
---|
14 |
|
---|
15 | pop.subpop.0.species.ind.numtrees = 3
|
---|
16 |
|
---|
17 | # "The result-producing branch" (the "third" tree in Koza-I p. 538)
|
---|
18 | pop.subpop.0.species.ind.tree.0 = ec.gp.GPTree
|
---|
19 | pop.subpop.0.species.ind.tree.0.tc = tc0
|
---|
20 | # "ADF0 body" (the "first" tree in Koza-I p. 538)
|
---|
21 | pop.subpop.0.species.ind.tree.1 = ec.gp.GPTree
|
---|
22 | pop.subpop.0.species.ind.tree.1.tc = tc1
|
---|
23 | # "ADF1 body" (the "second" tree in Koza-I p. 538)
|
---|
24 | pop.subpop.0.species.ind.tree.2 = ec.gp.GPTree
|
---|
25 | pop.subpop.0.species.ind.tree.2.tc = tc2
|
---|
26 |
|
---|
27 |
|
---|
28 |
|
---|
29 | # Now, let's define what tc0, tc1, and tc2 are.
|
---|
30 | # Each has a different function set, f0, f1, and f2
|
---|
31 |
|
---|
32 | gp.tc.size = 3
|
---|
33 |
|
---|
34 | gp.tc.0 = ec.gp.GPTreeConstraints
|
---|
35 | gp.tc.0.name = tc0
|
---|
36 | gp.tc.0.fset = f0
|
---|
37 | gp.tc.0.returns = nil
|
---|
38 | gp.tc.0.init = ec.gp.koza.GrowBuilder
|
---|
39 | gp.tc.0.init.growp = 0.5
|
---|
40 | gp.tc.0.init.min = 2
|
---|
41 | gp.tc.0.init.max = 6
|
---|
42 |
|
---|
43 | gp.tc.1 = ec.gp.GPTreeConstraints
|
---|
44 | gp.tc.1.name = tc1
|
---|
45 | gp.tc.1.fset = f1
|
---|
46 | gp.tc.1.returns = nil
|
---|
47 | gp.tc.1.init = ec.gp.koza.GrowBuilder
|
---|
48 | gp.tc.1.init.growp = 0.5
|
---|
49 | gp.tc.1.init.min = 2
|
---|
50 | gp.tc.1.init.max = 6
|
---|
51 |
|
---|
52 | gp.tc.2 = ec.gp.GPTreeConstraints
|
---|
53 | gp.tc.2.name = tc2
|
---|
54 | gp.tc.2.fset = f2
|
---|
55 | gp.tc.2.returns = nil
|
---|
56 | gp.tc.2.init = ec.gp.koza.GrowBuilder
|
---|
57 | gp.tc.2.init.growp = 0.5
|
---|
58 | gp.tc.2.init.min = 2
|
---|
59 | gp.tc.2.init.max = 6
|
---|
60 |
|
---|
61 |
|
---|
62 |
|
---|
63 | # Now we define the three function sets
|
---|
64 |
|
---|
65 | gp.fs.size = 3
|
---|
66 |
|
---|
67 |
|
---|
68 | gp.fs.0.name = f0
|
---|
69 |
|
---|
70 | ### The functions, carefully ordered :-) (See below)
|
---|
71 | gp.fs.0.func.0 = ec.app.parity.func.And
|
---|
72 | gp.fs.0.func.0.nc = nc2
|
---|
73 | gp.fs.0.func.1 = ec.app.parity.func.Or
|
---|
74 | gp.fs.0.func.1.nc = nc2
|
---|
75 | gp.fs.0.func.2 = ec.app.parity.func.Nand
|
---|
76 | gp.fs.0.func.2.nc = nc2
|
---|
77 | gp.fs.0.func.3 = ec.app.parity.func.Nor
|
---|
78 | gp.fs.0.func.3.nc = nc2
|
---|
79 | # ADF0 (2 arguments, tree 1)
|
---|
80 | gp.fs.0.func.4 = ec.gp.ADF
|
---|
81 | gp.fs.0.func.4.nc = nc2
|
---|
82 | gp.fs.0.func.4.tree = 1
|
---|
83 | gp.fs.0.func.4.name = ADF0
|
---|
84 |
|
---|
85 | # ADF1 (3 arguments, tree 2)
|
---|
86 | gp.fs.0.func.5 = ec.gp.ADF
|
---|
87 | gp.fs.0.func.5.nc = nc3
|
---|
88 | gp.fs.0.func.5.tree = 2
|
---|
89 | gp.fs.0.func.5.name = ADF1
|
---|
90 |
|
---|
91 | gp.fs.0.func.6 = ec.app.parity.func.D0
|
---|
92 | gp.fs.0.func.6.nc = nc0
|
---|
93 | gp.fs.0.func.7 = ec.app.parity.func.D1
|
---|
94 | gp.fs.0.func.7.nc = nc0
|
---|
95 | gp.fs.0.func.8 = ec.app.parity.func.D2
|
---|
96 | gp.fs.0.func.8.nc = nc0
|
---|
97 | gp.fs.0.func.9 = ec.app.parity.func.D3
|
---|
98 | gp.fs.0.func.9.nc = nc0
|
---|
99 | gp.fs.0.func.10 = ec.app.parity.func.D4
|
---|
100 | gp.fs.0.func.10.nc = nc0
|
---|
101 | gp.fs.0.func.11 = ec.app.parity.func.D5
|
---|
102 | gp.fs.0.func.11.nc = nc0
|
---|
103 | gp.fs.0.func.12 = ec.app.parity.func.D6
|
---|
104 | gp.fs.0.func.12.nc = nc0
|
---|
105 | gp.fs.0.func.13 = ec.app.parity.func.D7
|
---|
106 | gp.fs.0.func.13.nc = nc0
|
---|
107 | gp.fs.0.func.14 = ec.app.parity.func.D8
|
---|
108 | gp.fs.0.func.14.nc = nc0
|
---|
109 | gp.fs.0.func.15 = ec.app.parity.func.D9
|
---|
110 | gp.fs.0.func.16.nc = nc0
|
---|
111 | gp.fs.0.func.16 = ec.app.parity.func.D10
|
---|
112 | gp.fs.0.func.16.nc = nc0
|
---|
113 | gp.fs.0.func.17 = ec.app.parity.func.D11
|
---|
114 | gp.fs.0.func.17.nc = nc0
|
---|
115 | gp.fs.0.func.18 = ec.app.parity.func.D12
|
---|
116 | gp.fs.0.func.18.nc = nc0
|
---|
117 | gp.fs.0.func.19 = ec.app.parity.func.D13
|
---|
118 | gp.fs.0.func.19.nc = nc0
|
---|
119 | gp.fs.0.func.20 = ec.app.parity.func.D14
|
---|
120 | gp.fs.0.func.20.nc = nc0
|
---|
121 | gp.fs.0.func.21 = ec.app.parity.func.D15
|
---|
122 | gp.fs.0.func.21.nc = nc0
|
---|
123 | gp.fs.0.func.22 = ec.app.parity.func.D16
|
---|
124 | gp.fs.0.func.22.nc = nc0
|
---|
125 | gp.fs.0.func.23 = ec.app.parity.func.D17
|
---|
126 | gp.fs.0.func.23.nc = nc0
|
---|
127 | gp.fs.0.func.24 = ec.app.parity.func.D18
|
---|
128 | gp.fs.0.func.24.nc = nc0
|
---|
129 | gp.fs.0.func.25 = ec.app.parity.func.D19
|
---|
130 | gp.fs.0.func.25.nc = nc0
|
---|
131 | gp.fs.0.func.26 = ec.app.parity.func.D20
|
---|
132 | gp.fs.0.func.26.nc = nc0
|
---|
133 | gp.fs.0.func.27 = ec.app.parity.func.D21
|
---|
134 | gp.fs.0.func.27.nc = nc0
|
---|
135 | gp.fs.0.func.28 = ec.app.parity.func.D22
|
---|
136 | gp.fs.0.func.28.nc = nc0
|
---|
137 | gp.fs.0.func.29 = ec.app.parity.func.D23
|
---|
138 | gp.fs.0.func.29.nc = nc0
|
---|
139 | gp.fs.0.func.30 = ec.app.parity.func.D24
|
---|
140 | gp.fs.0.func.30.nc = nc0
|
---|
141 | gp.fs.0.func.31 = ec.app.parity.func.D25
|
---|
142 | gp.fs.0.func.31.nc = nc0
|
---|
143 | gp.fs.0.func.32 = ec.app.parity.func.D26
|
---|
144 | gp.fs.0.func.32.nc = nc0
|
---|
145 | gp.fs.0.func.33 = ec.app.parity.func.D27
|
---|
146 | gp.fs.0.func.33.nc = nc0
|
---|
147 | gp.fs.0.func.34 = ec.app.parity.func.D28
|
---|
148 | gp.fs.0.func.34.nc = nc0
|
---|
149 | gp.fs.0.func.35 = ec.app.parity.func.D29
|
---|
150 | gp.fs.0.func.35.nc = nc0
|
---|
151 | gp.fs.0.func.36 = ec.app.parity.func.D30
|
---|
152 | gp.fs.0.func.36.nc = nc0
|
---|
153 | gp.fs.0.func.37 = ec.app.parity.func.D31
|
---|
154 | gp.fs.0.func.37.nc = nc0
|
---|
155 |
|
---|
156 |
|
---|
157 |
|
---|
158 | # ADF1's tree
|
---|
159 | gp.fs.1.name = f1
|
---|
160 | gp.fs.1 = ec.gp.GPFunctionSet
|
---|
161 |
|
---|
162 | ### The functions, carefully ordered :-) (See below)
|
---|
163 | gp.fs.1.func.0 = ec.app.parity.func.And
|
---|
164 | gp.fs.1.func.0.nc = nc2
|
---|
165 | gp.fs.1.func.1 = ec.app.parity.func.Or
|
---|
166 | gp.fs.1.func.1.nc = nc2
|
---|
167 | gp.fs.1.func.2 = ec.app.parity.func.Nand
|
---|
168 | gp.fs.1.func.2.nc = nc2
|
---|
169 | gp.fs.1.func.3 = ec.app.parity.func.Nor
|
---|
170 | gp.fs.1.func.3.nc = nc2
|
---|
171 | # ARG0
|
---|
172 | gp.fs.1.func.4 = ec.gp.ADFArgument
|
---|
173 | gp.fs.1.func.4.nc = nc0
|
---|
174 | gp.fs.1.func.4.arg = 0
|
---|
175 | gp.fs.1.func.4.name = ARG0
|
---|
176 |
|
---|
177 | # ARG1
|
---|
178 | gp.fs.1.func.5 = ec.gp.ADFArgument
|
---|
179 | gp.fs.1.func.5.nc = nc0
|
---|
180 | gp.fs.1.func.5.arg = 1
|
---|
181 | gp.fs.1.func.5.name = ARG1
|
---|
182 |
|
---|
183 | gp.fs.1.func.6 = ec.app.parity.func.D0
|
---|
184 | gp.fs.1.func.6.nc = nc0
|
---|
185 | gp.fs.1.func.7 = ec.app.parity.func.D1
|
---|
186 | gp.fs.1.func.7.nc = nc0
|
---|
187 | gp.fs.1.func.8 = ec.app.parity.func.D2
|
---|
188 | gp.fs.1.func.8.nc = nc0
|
---|
189 | gp.fs.1.func.9 = ec.app.parity.func.D3
|
---|
190 | gp.fs.1.func.9.nc = nc0
|
---|
191 | gp.fs.1.func.10 = ec.app.parity.func.D4
|
---|
192 | gp.fs.1.func.10.nc = nc0
|
---|
193 | gp.fs.1.func.11 = ec.app.parity.func.D5
|
---|
194 | gp.fs.1.func.11.nc = nc0
|
---|
195 | gp.fs.1.func.12 = ec.app.parity.func.D6
|
---|
196 | gp.fs.1.func.12.nc = nc0
|
---|
197 | gp.fs.1.func.13 = ec.app.parity.func.D7
|
---|
198 | gp.fs.1.func.13.nc = nc0
|
---|
199 | gp.fs.1.func.14 = ec.app.parity.func.D8
|
---|
200 | gp.fs.1.func.14.nc = nc0
|
---|
201 | gp.fs.1.func.15 = ec.app.parity.func.D9
|
---|
202 | gp.fs.1.func.16.nc = nc0
|
---|
203 | gp.fs.1.func.16 = ec.app.parity.func.D10
|
---|
204 | gp.fs.1.func.16.nc = nc0
|
---|
205 | gp.fs.1.func.17 = ec.app.parity.func.D11
|
---|
206 | gp.fs.1.func.17.nc = nc0
|
---|
207 | gp.fs.1.func.18 = ec.app.parity.func.D12
|
---|
208 | gp.fs.1.func.18.nc = nc0
|
---|
209 | gp.fs.1.func.19 = ec.app.parity.func.D13
|
---|
210 | gp.fs.1.func.19.nc = nc0
|
---|
211 | gp.fs.1.func.20 = ec.app.parity.func.D14
|
---|
212 | gp.fs.1.func.20.nc = nc0
|
---|
213 | gp.fs.1.func.21 = ec.app.parity.func.D15
|
---|
214 | gp.fs.1.func.21.nc = nc0
|
---|
215 | gp.fs.1.func.22 = ec.app.parity.func.D16
|
---|
216 | gp.fs.1.func.22.nc = nc0
|
---|
217 | gp.fs.1.func.23 = ec.app.parity.func.D17
|
---|
218 | gp.fs.1.func.23.nc = nc0
|
---|
219 | gp.fs.1.func.24 = ec.app.parity.func.D18
|
---|
220 | gp.fs.1.func.24.nc = nc0
|
---|
221 | gp.fs.1.func.25 = ec.app.parity.func.D19
|
---|
222 | gp.fs.1.func.25.nc = nc0
|
---|
223 | gp.fs.1.func.26 = ec.app.parity.func.D20
|
---|
224 | gp.fs.1.func.26.nc = nc0
|
---|
225 | gp.fs.1.func.27 = ec.app.parity.func.D21
|
---|
226 | gp.fs.1.func.27.nc = nc0
|
---|
227 | gp.fs.1.func.28 = ec.app.parity.func.D22
|
---|
228 | gp.fs.1.func.28.nc = nc0
|
---|
229 | gp.fs.1.func.29 = ec.app.parity.func.D23
|
---|
230 | gp.fs.1.func.29.nc = nc0
|
---|
231 | gp.fs.1.func.30 = ec.app.parity.func.D24
|
---|
232 | gp.fs.1.func.30.nc = nc0
|
---|
233 | gp.fs.1.func.31 = ec.app.parity.func.D25
|
---|
234 | gp.fs.1.func.31.nc = nc0
|
---|
235 | gp.fs.1.func.32 = ec.app.parity.func.D26
|
---|
236 | gp.fs.1.func.32.nc = nc0
|
---|
237 | gp.fs.1.func.33 = ec.app.parity.func.D27
|
---|
238 | gp.fs.1.func.33.nc = nc0
|
---|
239 | gp.fs.1.func.34 = ec.app.parity.func.D28
|
---|
240 | gp.fs.1.func.34.nc = nc0
|
---|
241 | gp.fs.1.func.35 = ec.app.parity.func.D29
|
---|
242 | gp.fs.1.func.35.nc = nc0
|
---|
243 | gp.fs.1.func.36 = ec.app.parity.func.D30
|
---|
244 | gp.fs.1.func.36.nc = nc0
|
---|
245 | gp.fs.1.func.37 = ec.app.parity.func.D31
|
---|
246 | gp.fs.1.func.37.nc = nc0
|
---|
247 |
|
---|
248 |
|
---|
249 |
|
---|
250 |
|
---|
251 |
|
---|
252 | ## ADF0's tree
|
---|
253 | gp.fs.2.name = f2
|
---|
254 | gp.fs.2 = ec.gp.GPFunctionSet
|
---|
255 |
|
---|
256 | ### The functions, carefully ordered :-) (See below)
|
---|
257 | gp.fs.2.func.0 = ec.app.parity.func.And
|
---|
258 | gp.fs.2.func.0.nc = nc2
|
---|
259 | gp.fs.2.func.1 = ec.app.parity.func.Or
|
---|
260 | gp.fs.2.func.1.nc = nc2
|
---|
261 | gp.fs.2.func.2 = ec.app.parity.func.Nand
|
---|
262 | gp.fs.2.func.2.nc = nc2
|
---|
263 | gp.fs.2.func.3 = ec.app.parity.func.Nor
|
---|
264 | gp.fs.2.func.3.nc = nc2
|
---|
265 | # ARG0
|
---|
266 | gp.fs.2.func.4 = ec.gp.ADFArgument
|
---|
267 | gp.fs.2.func.4.nc = nc0
|
---|
268 | gp.fs.2.func.4.arg = 0
|
---|
269 | gp.fs.2.func.4.name = ARG0
|
---|
270 |
|
---|
271 | # ARG1
|
---|
272 | gp.fs.2.func.5 = ec.gp.ADFArgument
|
---|
273 | gp.fs.2.func.5.nc = nc0
|
---|
274 | gp.fs.2.func.5.arg = 1
|
---|
275 | gp.fs.2.func.5.name = ARG1
|
---|
276 |
|
---|
277 | # ARG2
|
---|
278 | gp.fs.2.func.6 = ec.gp.ADFArgument
|
---|
279 | gp.fs.2.func.6.nc = nc0
|
---|
280 | gp.fs.2.func.6.arg = 2
|
---|
281 | gp.fs.2.func.6.name = ARG2
|
---|
282 |
|
---|
283 | gp.fs.2.func.7 = ec.app.parity.func.D0
|
---|
284 | gp.fs.2.func.7.nc = nc0
|
---|
285 | gp.fs.2.func.8 = ec.app.parity.func.D1
|
---|
286 | gp.fs.2.func.8.nc = nc0
|
---|
287 | gp.fs.2.func.9 = ec.app.parity.func.D2
|
---|
288 | gp.fs.2.func.9.nc = nc0
|
---|
289 | gp.fs.2.func.10 = ec.app.parity.func.D3
|
---|
290 | gp.fs.2.func.10.nc = nc0
|
---|
291 | gp.fs.2.func.11 = ec.app.parity.func.D4
|
---|
292 | gp.fs.2.func.11.nc = nc0
|
---|
293 | gp.fs.2.func.12 = ec.app.parity.func.D5
|
---|
294 | gp.fs.2.func.12.nc = nc0
|
---|
295 | gp.fs.2.func.13 = ec.app.parity.func.D6
|
---|
296 | gp.fs.2.func.13.nc = nc0
|
---|
297 | gp.fs.2.func.14 = ec.app.parity.func.D7
|
---|
298 | gp.fs.2.func.14.nc = nc0
|
---|
299 | gp.fs.2.func.15 = ec.app.parity.func.D8
|
---|
300 | gp.fs.2.func.16.nc = nc0
|
---|
301 | gp.fs.2.func.16 = ec.app.parity.func.D9
|
---|
302 | gp.fs.2.func.16.nc = nc0
|
---|
303 | gp.fs.2.func.17 = ec.app.parity.func.D10
|
---|
304 | gp.fs.2.func.17.nc = nc0
|
---|
305 | gp.fs.2.func.18 = ec.app.parity.func.D11
|
---|
306 | gp.fs.2.func.18.nc = nc0
|
---|
307 | gp.fs.2.func.19 = ec.app.parity.func.D12
|
---|
308 | gp.fs.2.func.19.nc = nc0
|
---|
309 | gp.fs.2.func.20 = ec.app.parity.func.D13
|
---|
310 | gp.fs.2.func.20.nc = nc0
|
---|
311 | gp.fs.2.func.21 = ec.app.parity.func.D14
|
---|
312 | gp.fs.2.func.21.nc = nc0
|
---|
313 | gp.fs.2.func.22 = ec.app.parity.func.D15
|
---|
314 | gp.fs.2.func.22.nc = nc0
|
---|
315 | gp.fs.2.func.23 = ec.app.parity.func.D16
|
---|
316 | gp.fs.2.func.23.nc = nc0
|
---|
317 | gp.fs.2.func.24 = ec.app.parity.func.D17
|
---|
318 | gp.fs.2.func.24.nc = nc0
|
---|
319 | gp.fs.2.func.25 = ec.app.parity.func.D18
|
---|
320 | gp.fs.2.func.25.nc = nc0
|
---|
321 | gp.fs.2.func.26 = ec.app.parity.func.D19
|
---|
322 | gp.fs.2.func.26.nc = nc0
|
---|
323 | gp.fs.2.func.27 = ec.app.parity.func.D20
|
---|
324 | gp.fs.2.func.27.nc = nc0
|
---|
325 | gp.fs.2.func.28 = ec.app.parity.func.D21
|
---|
326 | gp.fs.2.func.28.nc = nc0
|
---|
327 | gp.fs.2.func.29 = ec.app.parity.func.D22
|
---|
328 | gp.fs.2.func.29.nc = nc0
|
---|
329 | gp.fs.2.func.30 = ec.app.parity.func.D23
|
---|
330 | gp.fs.2.func.30.nc = nc0
|
---|
331 | gp.fs.2.func.31 = ec.app.parity.func.D24
|
---|
332 | gp.fs.2.func.31.nc = nc0
|
---|
333 | gp.fs.2.func.32 = ec.app.parity.func.D25
|
---|
334 | gp.fs.2.func.32.nc = nc0
|
---|
335 | gp.fs.2.func.33 = ec.app.parity.func.D26
|
---|
336 | gp.fs.2.func.33.nc = nc0
|
---|
337 | gp.fs.2.func.34 = ec.app.parity.func.D27
|
---|
338 | gp.fs.2.func.34.nc = nc0
|
---|
339 | gp.fs.2.func.35 = ec.app.parity.func.D28
|
---|
340 | gp.fs.2.func.35.nc = nc0
|
---|
341 | gp.fs.2.func.36 = ec.app.parity.func.D29
|
---|
342 | gp.fs.2.func.36.nc = nc0
|
---|
343 | gp.fs.2.func.37 = ec.app.parity.func.D30
|
---|
344 | gp.fs.2.func.37.nc = nc0
|
---|
345 | gp.fs.2.func.38 = ec.app.parity.func.D31
|
---|
346 | gp.fs.2.func.38.nc = nc0
|
---|
347 |
|
---|
348 |
|
---|
349 | # We specify our problem here
|
---|
350 | #
|
---|
351 |
|
---|
352 | eval.problem = ec.app.parity.Parity
|
---|
353 | eval.problem.data = ec.app.parity.ParityData
|
---|
354 |
|
---|
355 |
|
---|
356 | # Here we determine what kind of Parity we're doing:
|
---|
357 | eval.problem.bits = 4
|
---|
358 | eval.problem.even = true
|
---|
359 |
|
---|
360 | # this value must always be set to *6* more than eval.problem.bits
|
---|
361 | gp.fs.0.size = 10
|
---|
362 | # this value must always be set to *6* more than eval.problem.bits
|
---|
363 | gp.fs.1.size = 10
|
---|
364 | # this value must always be set to *7* more than eval.problem.bits
|
---|
365 | gp.fs.2.size = 11
|
---|