-
Notifications
You must be signed in to change notification settings - Fork 0
/
control.params
409 lines (293 loc) · 11.1 KB
/
control.params
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# ec.EvolutionState
# ==============================
# We're not writing checkpoint files. If we were, we'd do it every
# generation, and the prefix to all the files would be "ec.*"
checkpoint = true
checkpoint-modulo = 1
checkpoint-prefix = ec
#
# The following parameter file will set up a very basic form
# of evolution, single-threaded, no coevolution, no exchanging,
# no cross-population breeding, using generational evolution,
# simple fitness, popsize=1024, etc.
# You'll need to fill in some of the gaps.
#
# ec.Evolve
# ==============================
# run for 51 generations, quit prematurely if I find something ideal
# ec.Initializer
# ==============================
pop = amb.ml.GP.ec.Population
# amb.ml.GP.ec.Population
# ==============================
# No multiple populations
pop.subpops = 1
pop.subpop.0 = amb.ml.GP.ec.Subpopulation
# amb.ml.GP.ec.Subpopulation
# ==============================
# don't bother trying to eliminate duplicates from the
# initial population
pop.subpop.0.duplicate-retries = 0
# ==You need to provide the species info for the subpopulation.==
# amb.ml.GP.ec.simple.SimpleBreeder
# ==============================
# By default elitism isn't done. If you want to do elitism for, say,
# the top 10 individuals in subpopulation 0, you'd say:
# breed.elite.0 = 10
# amb.ml.GP.ec.SimpleStatistics
# ==============================
# output statistics to the file "out.stat" in the directory
# the run was started in
stat.file $out.stat
#
# We define the fitness of an individual to use the traditional
# Koza-style fitness metrics, just to make everyone happy :-)
#
pop.subpop.0.species.fitness = amb.ml.GP.ec.gp.koza.KozaFitness
#
# We have a GP-specific initializer. But we'll keep the
# statistics as a SimpleStatistics (defined in simple.params)
init = amb.ml.GP.ec.gp.GPInitializer
# We have a single subpopulation containing a GPSpecies,
# using GPIndividuals as the prototypical individual class.
pop.subpop.0.species = amb.ml.GP.ec.gp.GPSpecies
pop.subpop.0.species.ind = amb.ml.GP.ec.gp.GPIndividual
# We retry 100 times for duplicates (this is the lil-gp default)
# in our subpopulation 0
pop.subpop.0.duplicate-retries = 100
# That GPIndividual has a single tree, which uses the
# "tc0" Tree Constraints (which we define below later)
pop.subpop.0.species.ind.numtrees = 1
pop.subpop.0.species.ind.tree.0 = amb.ml.GP.ec.gp.GPTree
pop.subpop.0.species.ind.tree.0.tc = tc0
# The GPSpecies has 2 pipelines, Crossover and Reproduction,
# chosen with 0.9 and 0.1 likelihood respectively.
pop.subpop.0.species.pipe = amb.ml.GP.ec.breed.MultiBreedingPipeline
# Koza's decision here was odd...
pop.subpop.0.species.pipe.generate-max = false
# Subsidiary pipelines:
pop.subpop.0.species.pipe.num-sources = 2
pop.subpop.0.species.pipe.source.0 = amb.ml.GP.ec.gp.koza.CrossoverPipeline
pop.subpop.0.species.pipe.source.0.prob = 0.9
pop.subpop.0.species.pipe.source.1 = amb.ml.GP.ec.breed.ReproductionPipeline
pop.subpop.0.species.pipe.source.1.prob = 0.1
#
# Here we define the default values for Crossover,
# Reproduction, Mutation, as well as our selection
# approaches (Koza I). These can be overridden on a per-species
# level of course.
#
# Reproduction will use Tournament Selection
breed.reproduce.source.0 = amb.ml.GP.ec.select.TournamentSelection
# Crossover will use Tournament Selection, try only 1
# time, have a max depth of 17, and use KozaNodeSelector
gp.koza.xover.source.0 = amb.ml.GP.ec.select.TournamentSelection
gp.koza.xover.source.1 = same
gp.koza.xover.ns.0 = amb.ml.GP.ec.gp.koza.KozaNodeSelector
gp.koza.xover.ns.1 = same
gp.koza.xover.maxdepth = 17
# This is the default for Koza and lil-gp, though it's
# a little wimpy; on the other hand, a higher number can
# make things really slow
gp.koza.xover.tries = 1
# Point Mutation will use Tournament Selection, try only 1
# time, have a max depth of 17, and use KozaNodeSelector
# and GROW for building. Also, Point Mutation uses a GrowBuilder
# by default, with a default of min-depth=max-depth=5
# as shown a ways below
gp.koza.mutate.source.0 = amb.ml.GP.ec.select.TournamentSelection
gp.koza.mutate.ns.0 = amb.ml.GP.ec.gp.koza.KozaNodeSelector
gp.koza.mutate.build.0 = amb.ml.GP.ec.gp.koza.GrowBuilder
gp.koza.mutate.maxdepth = 17
# This is the default for Koza and lil-gp, though it's
# a little wimpy; on the other hand, a higher number can
# make things really slow
gp.koza.mutate.tries = 1
#
# The default tournament size for TournamentSelection is 7
#
select.tournament.size = 7
# Since GROW is only used for subtree mutation, ECJ uses
# the Koza-standard subtree mutation GROW values for the
# default for GROW as a whole. This default is
# min-depth=max-depth=5, which I don't like very much,
# but hey, that's the standard.
# This means that if someone decided to use GROW to generate
# new individual trees, it's also use the defaults below
# unless he overrided them locally.
gp.koza.grow.min-depth = 5
gp.koza.grow.max-depth = 5
#
# We specify a few things about ADFs -- what kind
# of stack they use, and what kind of context
#
gp.problem.stack = amb.ml.GP.ec.gp.ADFStack
gp.adf-stack.context = amb.ml.GP.ec.gp.ADFContext
#
# Here we define the default values for KozaNodeSelection;
# as always, these can be overridden by values hanging off
# of the Crossover/Reproduction/Mutation/whatever pipelines,
# like we did for node-building, but hey, whatever.
# The default is 10% terminals, 90% nonterminals when possible,
# 0% "always pick the root", 0% "pick any node"
gp.koza.ns.terminals = 0.1
gp.koza.ns.nonterminals = 0.9
gp.koza.ns.root = 0.0
# You need to create at least one function set,
# called "f0", which your first tree will use.
# You don't need to include the class declaration here,
# but it quiets warnings.
gp.fs.size = 1
gp.fs.0 = amb.ml.GP.ec.gp.GPFunctionSet
gp.fs.0.name = f0
#fill the rest of this out on a per-problem basis
# Here we define a single atomic type, "nil", which everyone will use.
# There are no set types defined.
gp.type.a.size = 1
gp.type.a.0.name = nil
gp.type.s.size = 0
# Here we define one GPTreeConstraints object, "tc0",
# which uses amb.ml.GP.ec.gp.koza.HalfBuilder to create nodes,
# only allows nodes from the GPFunctionSet "fset",
# and has the single type "nil" as its tree type.
# You don't need to include the class declaration here,
# but it quiets warnings.
gp.tc.size = 1
gp.tc.0 = amb.ml.GP.ec.gp.GPTreeConstraints
gp.tc.0.name = tc0
gp.tc.0.fset = f0
gp.tc.0.returns = nil
# The tree uses an amb.ml.GP.ec.gp.koza.HalfBuilder to create
# itself initially.
# HalfBuilder will pick GROW half the time and FULL
# the other half, with a ramp from 2 to 6 inclusive.
# By ramp we mean that it first picks a random number between
# 2 and 6 inclusive. This then becomes the *maximum* tree size
# (for the FULL approach, it's the tree size of the tree, for
# GROW, the tree can get no bigger than this)
gp.tc.0.init = amb.ml.GP.ec.gp.koza.HalfBuilder
# We set the default for HalfBuilder to be a ramp of 2--6,
# with a grow probability of 0.5
gp.koza.half.min-depth = 2
gp.koza.half.max-depth = 6
gp.koza.half.growp = 0.5
# Here we define 7 GPNodeConstraints, nc0...nc6, which
# describe nodes with 0...6 children respectively, which only
# use a single type, "nil", for their argument and return types
# You don't need to include the class declarations with everything
# else below, but it quiets warnings
gp.nc.size = 6
gp.nc.0 = amb.ml.GP.ec.gp.GPNodeConstraints
gp.nc.0.name = nc0
gp.nc.0.returns = nil
gp.nc.0.size = 0
gp.nc.1 = amb.ml.GP.ec.gp.GPNodeConstraints
gp.nc.1.name = nc1
gp.nc.1.returns = nil
gp.nc.1.size = 1
gp.nc.1.child.0 = nil
gp.nc.2 = amb.ml.GP.ec.gp.GPNodeConstraints
gp.nc.2.name = nc2
gp.nc.2.returns = nil
gp.nc.2.size = 2
gp.nc.2.child.0 = nil
gp.nc.2.child.1 = nil
gp.nc.3 = amb.ml.GP.ec.gp.GPNodeConstraints
gp.nc.3.name = nc3
gp.nc.3.returns = nil
gp.nc.3.size = 3
gp.nc.3.child.0 = nil
gp.nc.3.child.1 = nil
gp.nc.3.child.2 = nil
gp.nc.4 = amb.ml.GP.ec.gp.GPNodeConstraints
gp.nc.4.name = nc4
gp.nc.4.returns = nil
gp.nc.4.size = 4
gp.nc.4.child.0 = nil
gp.nc.4.child.1 = nil
gp.nc.4.child.2 = nil
gp.nc.4.child.3 = nil
gp.nc.5 = amb.ml.GP.ec.gp.GPNodeConstraints
gp.nc.5.name = nc5
gp.nc.5.returns = nil
gp.nc.5.size = 5
gp.nc.5.child.0 = nil
gp.nc.5.child.1 = nil
gp.nc.5.child.2 = nil
gp.nc.5.child.3 = nil
gp.nc.5.child.4 = nil
gp.nc.6 = amb.ml.GP.ec.gp.GPNodeConstraints
gp.nc.6.name = nc6
gp.nc.6.returns = nil
gp.nc.6.size = 6
gp.nc.6.child.0 = nil
gp.nc.6.child.1 = nil
gp.nc.6.child.2 = nil
gp.nc.6.child.3 = nil
gp.nc.6.child.4 = nil
gp.nc.6.child.5 = nil
# Stolen from koza/params -- overwriting just
# a little for readability
# You need to create at least one function set,
# called "f0", which your first tree will use.
gp.fs.size = 1
gp.fs.0.name = f0
gp.fs.0.size = 10
gp.fs.0.func.0 = amb.ml.GP.ec.app.control.func.Xn
gp.fs.0.func.0.nc = nc0
gp.fs.0.func.1 = amb.ml.GP.ec.app.control.func.Add
gp.fs.0.func.1.nc = nc2
gp.fs.0.func.2 = amb.ml.GP.ec.app.control.func.Mul
gp.fs.0.func.2.nc = nc2
gp.fs.0.func.3 = amb.ml.GP.ec.app.control.func.Sub
gp.fs.0.func.3.nc = nc2
gp.fs.0.func.4 = amb.ml.GP.ec.app.control.func.Div
gp.fs.0.func.4.nc = nc2
gp.fs.0.func.5 = amb.ml.GP.ec.app.control.func.Sin
gp.fs.0.func.5.nc = nc1
gp.fs.0.func.6 = amb.ml.GP.ec.app.control.func.Cos
gp.fs.0.func.6.nc = nc1
gp.fs.0.func.7 = amb.ml.GP.ec.app.control.func.Exp
gp.fs.0.func.7.nc = nc1
gp.fs.0.func.8 = amb.ml.GP.ec.app.control.func.Log
gp.fs.0.func.8.nc = nc1
#gp.fs.0.func.9 = amb.ml.GP.ec.app.control.func.ASin
#gp.fs.0.func.9.nc = nc1
#gp.fs.0.func.10 = amb.ml.GP.ec.app.control.func.ACos
#gp.fs.0.func.10.nc = nc1
# placed here at the bottom so noerc.params can skip it
gp.fs.0.func.9 = amb.ml.GP.ec.app.control.func.RegERC
gp.fs.0.func.9.nc = nc0
#gp.fs.0.func.12 = amb.ml.GP.ec.app.control.func.Root
#gp.fs.0.func.12.nc = nc7
#
# We specify our problem here
#
eval.problem = amb.ml.GP.ec.app.control.Control
eval.problem.data = amb.ml.GP.ec.app.control.ControlData
init = amb.ml.GP.ec.gp.GPInitializer
exch = amb.ml.GP.ec.simple.SimpleExchanger
breed = amb.ml.GP.ec.simple.SimpleBreeder
eval = amb.ml.GP.ec.simple.SimpleEvaluator
#stat = amb.ml.GP.ec.app.control.ControlStatistics
stat = amb.ml.GP.ec.app.control.AMBStatistics
finish = amb.ml.GP.ec.app.control.ControlFinisher
state = amb.ml.GP.ec.app.control.ControlEvolutionState
eval.problem.groups = 1
eval.problem.sensors = 2
eval.problem.debug = true
# Highest value output
eval.problem.upBound = 0.1
# Lowest value output
eval.problem.lowBound = -0.1
# Precicion (digits)
eval.problem.precision = 3
generations = 2
quit-on-run-complete = true
# subpop size is 100 individuals
pop.subpop.0.size = 2
# Threads
evalthreads = 1
breedthreads = 1
seed.0 = time
seed.1 = time