I was busy writing parts of my thesis so I couldn't spend time reading your response. Sean, what you write here is exactly what I want: >For example, let's say the result branch is the one you listed below. >I'll put it in Lisp form: > > (if xx (adf (if yx yy yz)) xy) > >When the 'adf' node is called, we first call its subtree (if yx yy yz) >and store that in a variable called, say, foo0. Then ccontrol is >transferred to its corresponding ADF tree. Let's say that tree looks >like this: > >ADF: (* (sin adfargument0) (+ x 1)) This is the kind of ADF Argument I want: a tree. However, none of the examples provided with ECJ has an ADF argument that's really (or could be) a function instead of a terminal. This can be seen for example for the two-box problem: gp.fs.1.func.6 = ec.gp.ADFArgument gp.fs.1.func.6.arg = 2 gp.fs.1.func.6.nc = nc0 nc0 means it's a terminal (i.e. a function with 0 arguments = terminal). So I tried changing the nc0 constraint with a constraint (if-constraint) that I also use in the ADF tree and the result producing branch. Simply put, this constraint just checks that there are 3 arguments. The first argument is pretty much restricted to terminals, the other arguments can be anything. I've been working with this constraint for months now. So I can be certain that it's well defined. Here are my parameters, I really don't understand what's wrong with it. I first give the uninteresting parts. The parameters that matter are at the end: # Now, let's define what tc0 and tc1 are. # Each has a different function set, f0 and f1 gp.tc.size = 2 gp.tc.0 = ec.gp.GPTreeConstraints gp.tc.0.name = tc0 gp.tc.0.fset = f0 gp.tc.0.returns = void-sort-of gp.tc.0.init = ec.gp.koza.HalfBuilder gp.tc.0.init.growp = 0.5 gp.tc.0.init.min = 2 # ============================== # ============================== # ============================== gp.tc.1 = ec.gp.GPTreeConstraints gp.tc.1.name = tc1 gp.tc.1.fset = f1 gp.tc.1.returns = void-sort-of gp.tc.1.init = ec.gp.koza.HalfBuilder gp.tc.1.init.growp = 0.5 gp.tc.1.init.min = 1 gp.tc.1.init.max = 3 # Now, let's define the two function sets. gp.fs.size = 2 # We have 12 functions in the function set. They are: gp.fs.0 = ec.gp.GPFunctionSet gp.fs.0.name = f0 gp.fs.0.info = ec.gp.GPFuncInfo gp.fs.0.size = 11 [...] gp.fs.0.func.10 = ec.gp.ADF # tree 1 (the "ADF0 body"), 1 argument gp.fs.0.func.10.nc = if-constraint gp.fs.0.func.10.tree = 1 gp.fs.0.func.10.name = 0 # The "ADF0 body" -- see Koza-II p. 245 gp.fs.1 = ec.gp.GPFunctionSet gp.fs.1.name = f1 gp.fs.1.info = ec.gp.GPFuncInfo gp.fs.1.size = 3 gp.fs.1.func.0 = ec.app.connect4.functions.If gp.fs.1.func.0.nc = if-constraint gp.fs.1.func.1 = ec.app.connect4.functions.Win gp.fs.1.func.1.nc = nc0 # ARG0 gp.fs.1.func.2 = ec.gp.ADFArgument gp.fs.1.func.2.arg = 0 # Meaning it's the first argument! gp.fs.1.func.2.nc = if-constraint The error I get when running this: Processing GP Function Sets ERROR: Incorrect number of children for ADF Argument terminal -- should be 0. Check the constraints. PARAMETER: gp.fs.1.func.2 ALSO: gp.adf-argument SYSTEM EXITING FROM ERRORS With gp.fs.1.func.2.nc = nc0 everything works except that the ADF argument is a terminal and not a tree! Don't mind the logic of the ADF, I admit it's simple. I just want to test the strength of an ADF to solve a (simple) subtask which is actually what an ADF is supposed to do. That's why I'd like to limit the depth of the ADF tree (not the depth of the argument tree) to say 5. gp.tc.1.maxdepth = 5 or gp.tc.1.max-depth = 5 doesn't work. How can I solve this little problem? It's a pretty long mail, sorry for that. To resume I ask two things: 1. How can I have a tree as ADF argument instead of just a terminal? 2. How can I change the depth of a tree which is set to 17 by default I believe?