Print

Print


Now I'm working on a configuration file. My intent is that there are four types of nodes:

(play <move> <sequence>) is a <sequence>
(if <move> <sequence> <sequence>) is a <sequence>
(random) is a <sequence>
move is a <move> (and also an ERC)

Below is my attempt at a .params file, which I adapted from Tutorial 4. It does produce trees made of the right parts, but seems to be paying no attention to the types. Is there something I forgot to include, or am I doing the types wrong?

Peter Drake
http://www.lclark.edu/~drake/


parent.0 = ../../ec/gp/koza/koza.params
generations = 1

# the next four items are already defined in koza.params, but we
# put them here to be clear.

# We have one function set, of class GPFunctionSet
gp.fs.size = 1
gp.fs.0 = ec.gp.GPFunctionSet
# We'll call the function set "f0".  It uses the default GPFuncInfo class
gp.fs.0.name = f0
gp.fs.0.info = ec.gp.GPFuncInfo

# Types
gp.a.size = 2 # Two atomic types
gp.a.0.name = sequence
gp.a.1.name = move

# We have five functions in the function set.  They are:
gp.fs.0.size = 4

gp.fs.0.func.0 = orego.gp.MoveNode
gp.fs.0.func.0.nc = nc0
gp.fs.0.func.0.nc.size = 1
gp.fs.0.func.0.nc.0.returns = move
gp.fs.0.func.0.nc.0.size = 0

gp.fs.0.func.1 = orego.gp.IfNode
gp.fs.0.func.1.nc = nc3
gp.fs.0.func.1.nc.size = 1
gp.fs.0.func.1.nc.0.returns = sequence
gp.fs.0.func.1.nc.0.size = 3
gp.fs.0.func.1.nc.0.child.0 = move
gp.fs.0.func.1.nc.0.child.1 = sequence
gp.fs.0.func.1.nc.0.child.2 = sequence

gp.fs.0.func.2 = orego.gp.PlayNode
gp.fs.0.func.2.nc = nc2
gp.fs.0.func.2.nc.size = 1
gp.fs.0.func.2.nc.0.returns = sequence
gp.fs.0.func.2.nc.0.size = 2
gp.fs.0.func.2.nc.0.child.0 = move
gp.fs.0.func.2.nc.0.child.1 = sequence

gp.fs.0.func.3 = orego.gp.RandomNode
gp.fs.0.func.3.nc = nc0
gp.fs.0.func.3.nc.size = 1
gp.fs.0.func.3.nc.0.returns = sequence
gp.fs.0.func.3.nc.0.size = 0

eval.problem = orego.gp.MultiValuedRegression
eval.problem.data = orego.gp.DoubleData

# The following should almost *always* be the same as eval.problem.data
# For those who are interested, it defines the data object used internally
# inside ADF stack contexts
eval.problem.stack.context.data = ec.app.tutorial4.DoubleData