Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKBJavaConnector/ECJClient/src/ec/gp/koza/koza.params @ 9449

Last change on this file since 9449 was 6152, checked in by bfarka, 14 years ago

added ecj and custom statistics to communicate with the okb services #1441

File size: 7.3 KB
Line 
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#
6# This file roughly defines a typeless, Koza-I-style
7# generational GP system with a single tree (meaning
8# no ADFs or ADMs.  We use Tournament selection instead
9# of Koza-style Fitness-proportionate selection because
10# fitness-proportionate selection, well, is kinda icky.
11#
12
13# We're derived some of this
14# from ../../simple/params, which defines
15# generational, basic evolutionary mechanisms, selection mechanisms...
16
17parent.0 = ../../simple/simple.params
18
19
20#
21# We define the fitness of an individual to use the traditional
22# Koza-style fitness metrics, just to make everyone happy :-)
23#
24
25pop.subpop.0.species.fitness = ec.gp.koza.KozaFitness
26
27#
28# We have a GP-specific initializer.  But we'll keep the
29# statistics as a SimpleStatistics (defined in simple.params)
30
31init = ec.gp.GPInitializer
32
33
34# We have a single subpopulation containing a GPSpecies,
35# using GPIndividuals as the prototypical individual class.
36
37pop.subpop.0.species = ec.gp.GPSpecies
38pop.subpop.0.species.ind = ec.gp.GPIndividual
39
40# We retry 100 times for duplicates (this is the lil-gp default)
41# in our subpopulation 0
42
43pop.subpop.0.duplicate-retries = 100
44
45# That GPIndividual has a single tree, which uses the
46# "tc0" Tree Constraints (which we define below later)
47
48pop.subpop.0.species.ind.numtrees = 1
49pop.subpop.0.species.ind.tree.0 = ec.gp.GPTree
50pop.subpop.0.species.ind.tree.0.tc = tc0
51
52
53# The GPSpecies has 2 pipelines, Crossover and Reproduction,
54# chosen with 0.9 and 0.1 likelihood respectively.
55
56pop.subpop.0.species.pipe = ec.breed.MultiBreedingPipeline
57# Koza's decision here was odd...
58pop.subpop.0.species.pipe.generate-max = false
59# Subsidiary pipelines:
60pop.subpop.0.species.pipe.num-sources = 2
61pop.subpop.0.species.pipe.source.0 = ec.gp.koza.CrossoverPipeline
62pop.subpop.0.species.pipe.source.0.prob = 0.9
63pop.subpop.0.species.pipe.source.1 = ec.breed.ReproductionPipeline
64pop.subpop.0.species.pipe.source.1.prob = 0.1
65
66
67
68
69#
70# Here we define the default values for Crossover,
71# Reproduction, Mutation, as well as our selection
72# approaches (Koza I).  These can be overridden on a per-species
73# level of course.
74#
75
76# Reproduction will use Tournament Selection
77breed.reproduce.source.0 = ec.select.TournamentSelection
78
79# Crossover will use Tournament Selection, try only 1
80# time, have a max depth of 17, and use KozaNodeSelector
81gp.koza.xover.source.0 = ec.select.TournamentSelection
82gp.koza.xover.source.1 = same
83gp.koza.xover.ns.0 = ec.gp.koza.KozaNodeSelector
84gp.koza.xover.ns.1 = same
85gp.koza.xover.maxdepth = 17
86# This is the default for Koza and lil-gp, though it's
87# a little wimpy; on the other hand, a higher number can
88# make things really slow
89gp.koza.xover.tries = 1
90
91
92
93
94# Point Mutation will use Tournament Selection, try only 1
95# time, have a max depth of 17, and use KozaNodeSelector
96# and GROW for building.  Also, Point Mutation uses a GrowBuilder
97# by default, with a default of min-depth=max-depth=5
98# as shown a ways below
99gp.koza.mutate.source.0 = ec.select.TournamentSelection
100gp.koza.mutate.ns.0 = ec.gp.koza.KozaNodeSelector
101gp.koza.mutate.build.0 = ec.gp.koza.GrowBuilder
102gp.koza.mutate.maxdepth = 17
103# This is the default for Koza and lil-gp, though it's
104# a little wimpy; on the other hand, a higher number can
105# make things really slow
106gp.koza.mutate.tries = 1
107
108
109
110
111#
112# The default tournament size for TournamentSelection is 7
113#
114
115select.tournament.size = 7
116
117
118
119
120# Since GROW is only used for subtree mutation, ECJ uses
121# the Koza-standard subtree mutation GROW values for the
122# default for GROW as a whole.  This default is
123# min-depth=max-depth=5, which I don't like very much,
124# but hey, that's the standard. 
125# This means that if someone decided to use GROW to generate
126# new individual trees, it's also use the defaults below
127# unless he overrided them locally.
128gp.koza.grow.min-depth = 5
129gp.koza.grow.max-depth = 5
130
131
132
133#
134# We specify a few things about ADFs  -- what kind
135# of stack they use, and what kind of context
136#
137
138gp.problem.stack = ec.gp.ADFStack
139gp.adf-stack.context = ec.gp.ADFContext
140
141#
142# Here we define the default values for KozaNodeSelection;
143# as always, these can be overridden by values hanging off
144# of the Crossover/Reproduction/Mutation/whatever pipelines,
145# like we did for node-building, but hey, whatever.
146# The default is 10% terminals, 90% nonterminals when possible,
147# 0% "always pick the root", 0% "pick any node"
148
149gp.koza.ns.terminals = 0.1
150gp.koza.ns.nonterminals = 0.9
151gp.koza.ns.root = 0.0
152
153
154
155
156# You need to create at least one function set,
157# called "f0", which your first tree will use. 
158# You don't need to include the class declaration here,
159# but it quiets warnings.
160
161gp.fs.size = 1
162gp.fs.0 = ec.gp.GPFunctionSet
163gp.fs.0.name = f0
164#fill the rest of this out on a per-problem basis
165
166
167# Here we define a single atomic type, "nil", which everyone will use.
168# There are no set types defined.
169
170gp.type.a.size = 1
171gp.type.a.0.name = nil
172gp.type.s.size = 0
173
174# Here we define one GPTreeConstraints object, "tc0",
175# which uses ec.gp.koza.HalfBuilder to create nodes,
176# only allows nodes from the GPFunctionSet "fset",
177# and has the single type "nil" as its tree type.
178# You don't need to include the class declaration here,
179# but it quiets warnings.
180
181gp.tc.size = 1
182gp.tc.0 = ec.gp.GPTreeConstraints
183gp.tc.0.name = tc0
184gp.tc.0.fset = f0
185gp.tc.0.returns = nil
186
187# The tree uses an ec.gp.koza.HalfBuilder to create
188# itself initially.
189# HalfBuilder will pick GROW half the time and FULL
190# the other half, with a ramp from 2 to 6 inclusive.
191# By ramp we mean that it first picks a random number between
192# 2 and 6 inclusive.  This then becomes the *maximum* tree size
193# (for the FULL approach, it's the tree size of the tree, for
194# GROW, the tree can get no bigger than this)
195
196gp.tc.0.init = ec.gp.koza.HalfBuilder
197
198# We set the default for HalfBuilder to be a ramp of 2--6,
199# with a grow probability of 0.5
200gp.koza.half.min-depth = 2
201gp.koza.half.max-depth = 6
202gp.koza.half.growp = 0.5
203
204
205
206
207# Here we define 7 GPNodeConstraints, nc0...nc6, which
208# describe nodes with 0...6 children respectively, which only
209# use a single type, "nil", for their argument and return types
210# You don't need to include the class declarations with everything
211# else below, but it quiets warnings
212
213gp.nc.size = 7
214
215gp.nc.0 = ec.gp.GPNodeConstraints
216gp.nc.0.name = nc0
217gp.nc.0.returns = nil
218gp.nc.0.size = 0
219
220gp.nc.1 = ec.gp.GPNodeConstraints
221gp.nc.1.name = nc1
222gp.nc.1.returns = nil
223gp.nc.1.size = 1
224gp.nc.1.child.0 = nil
225
226gp.nc.2 = ec.gp.GPNodeConstraints
227gp.nc.2.name = nc2
228gp.nc.2.returns = nil
229gp.nc.2.size = 2
230gp.nc.2.child.0 = nil
231gp.nc.2.child.1 = nil
232
233gp.nc.3 = ec.gp.GPNodeConstraints
234gp.nc.3.name = nc3
235gp.nc.3.returns = nil
236gp.nc.3.size = 3
237gp.nc.3.child.0 = nil
238gp.nc.3.child.1 = nil
239gp.nc.3.child.2 = nil
240
241gp.nc.4 = ec.gp.GPNodeConstraints
242gp.nc.4.name = nc4
243gp.nc.4.returns = nil
244gp.nc.4.size = 4
245gp.nc.4.child.0 = nil
246gp.nc.4.child.1 = nil
247gp.nc.4.child.2 = nil
248gp.nc.4.child.3 = nil
249
250gp.nc.5 = ec.gp.GPNodeConstraints
251gp.nc.5.name = nc5
252gp.nc.5.returns = nil
253gp.nc.5.size = 5
254gp.nc.5.child.0 = nil
255gp.nc.5.child.1 = nil
256gp.nc.5.child.2 = nil
257gp.nc.5.child.3 = nil
258gp.nc.5.child.4 = nil
259
260gp.nc.6 = ec.gp.GPNodeConstraints
261gp.nc.6.name = nc6
262gp.nc.6.returns = nil
263gp.nc.6.size = 6
264gp.nc.6.child.0 = nil
265gp.nc.6.child.1 = nil
266gp.nc.6.child.2 = nil
267gp.nc.6.child.3 = nil
268gp.nc.6.child.4 = nil
269gp.nc.6.child.5 = nil
270
271
272
Note: See TracBrowser for help on using the repository browser.