# Copyright 2006 by Sean Luke and George Mason University # Licensed under the Academic Free License version 3.0 # See the file "LICENSE" for more information parent.0 = ../../gp/koza/koza.params # First, we're gonna change the number of trees in # the individual, to accommodate the ADFs # Each of our three trees uses a different tree constraints, # tc0, tc1, tc2 pop.subpop.0.species.ind.numtrees = 3 # "The result-producing branch" (Koza-II p. 245) pop.subpop.0.species.ind.tree.0 = ec.gp.GPTree pop.subpop.0.species.ind.tree.0.tc = tc0 # "ADF0 body" (Koza-II p. 245) pop.subpop.0.species.ind.tree.1 = ec.gp.GPTree pop.subpop.0.species.ind.tree.1.tc = tc1 # "ADF1 body" (Koza-II p. 245) pop.subpop.0.species.ind.tree.2 = ec.gp.GPTree pop.subpop.0.species.ind.tree.2.tc = tc2 # Now, let's define what tc0, tc1, and tc2 are. # Each has a different function set, f0, f1, and f2 gp.tc.size = 3 gp.tc.0 = ec.gp.GPTreeConstraints gp.tc.0.name = tc0 gp.tc.0.fset = f0 gp.tc.0.returns = nil gp.tc.0.init = ec.gp.koza.HalfBuilder gp.tc.0.init.growp = 0.5 gp.tc.0.init.min = 2 gp.tc.0.init.max = 6 gp.tc.1 = ec.gp.GPTreeConstraints gp.tc.1.name = tc1 gp.tc.1.fset = f1 gp.tc.1.returns = nil gp.tc.1.init = ec.gp.koza.HalfBuilder gp.tc.1.init.growp = 0.5 gp.tc.1.init.min = 2 gp.tc.1.init.max = 6 gp.tc.2 = ec.gp.GPTreeConstraints gp.tc.2.name = tc2 gp.tc.2.fset = f2 gp.tc.2.returns = nil gp.tc.2.init = ec.gp.koza.HalfBuilder gp.tc.2.init.growp = 0.5 gp.tc.2.init.min = 2 gp.tc.2.init.max = 6 # Now, let's define the three function sets. gp.fs.size = 3 gp.fs.0.name = f0 gp.fs.0.size = 8 gp.fs.0 = ec.gp.GPFunctionSet gp.fs.0.func.0 = ec.app.lawnmower.func.LawnERC gp.fs.0.func.0.nc = nc0 gp.fs.0.func.1 = ec.app.lawnmower.func.Left gp.fs.0.func.1.nc = nc0 gp.fs.0.func.2 = ec.app.lawnmower.func.Mow gp.fs.0.func.2.nc = nc0 gp.fs.0.func.3 = ec.app.lawnmower.func.V8a gp.fs.0.func.3.nc = nc2 gp.fs.0.func.4 = ec.app.lawnmower.func.Progn2 gp.fs.0.func.4.nc = nc2 gp.fs.0.func.5 = ec.app.lawnmower.func.Frog gp.fs.0.func.5.nc = nc1 gp.fs.0.func.6 = ec.gp.ADF gp.fs.0.func.6.nc = nc0 # tree 1 (the "ADF0 body") gp.fs.0.func.6.tree = 1 gp.fs.0.func.6.name = ADF0 gp.fs.0.func.7 = ec.gp.ADF gp.fs.0.func.7.nc = nc1 # tree 1 (the "ADF1 body") gp.fs.0.func.7.tree = 2 gp.fs.0.func.7.name = ADF1 # It's interesting that in the "ADF0 body", # FROG is not used, see Koza-II p. 245 gp.fs.1 = ec.gp.GPFunctionSet gp.fs.1.name = f1 gp.fs.1.size = 5 gp.fs.1.func.0 = ec.app.lawnmower.func.LawnERC gp.fs.1.func.0.nc = nc0 gp.fs.1.func.1 = ec.app.lawnmower.func.Left gp.fs.1.func.1.nc = nc0 gp.fs.1.func.2 = ec.app.lawnmower.func.Mow gp.fs.1.func.2.nc = nc0 gp.fs.1.func.3 = ec.app.lawnmower.func.V8a gp.fs.1.func.3.nc = nc2 gp.fs.1.func.4 = ec.app.lawnmower.func.Progn2 gp.fs.1.func.4.nc = nc2 # The "ADF1 body" -- see Koza-II p. 245 gp.fs.2 = ec.gp.GPFunctionSet gp.fs.2.name = f2 gp.fs.2.size = 8 gp.fs.2.func.0 = ec.app.lawnmower.func.LawnERC gp.fs.2.func.0.nc = nc0 gp.fs.2.func.1 = ec.app.lawnmower.func.Left gp.fs.2.func.1.nc = nc0 gp.fs.2.func.2 = ec.app.lawnmower.func.Mow gp.fs.2.func.2.nc = nc0 gp.fs.2.func.3 = ec.app.lawnmower.func.V8a gp.fs.2.func.3.nc = nc2 gp.fs.2.func.4 = ec.app.lawnmower.func.Progn2 gp.fs.2.func.4.nc = nc2 gp.fs.2.func.5 = ec.app.lawnmower.func.Frog gp.fs.2.func.5.nc = nc1 gp.fs.2.func.6 = ec.gp.ADFArgument gp.fs.2.func.6.nc = nc0 gp.fs.2.func.6.name = ARG0 # argument 0 of the calling ADF ("ADF1") gp.fs.2.func.6.arg = 0 gp.fs.2.func.7 = ec.gp.ADF gp.fs.2.func.7.nc = nc0 # tree 1 (the "ADF0 body") gp.fs.2.func.7.tree = 1 gp.fs.2.func.7.name = ADF0 # # We specify our problem here # eval.problem = ec.app.lawnmower.Lawnmower eval.problem.data = ec.app.lawnmower.LawnmowerData eval.problem.x = 8 eval.problem.y = 8 stat.gather-full = true