April 2009


Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Reply To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Tue, 14 Apr 2009 08:35:08 -0400
text/plain (120 lines)
I was busy writing parts of my thesis so I couldn't spend time reading your

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
gp.fs.1.func.6 =
gp.fs.1.func.6.arg = 2 = 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 = 2 = = tc0 = f0 = void-sort-of = = 0.5 = 2
# ==============================
# ==============================
# ============================== = = tc1 = f1 = void-sort-of = = 0.5 = 1 = 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 = = f0 =
gp.fs.0.size = 11
gp.fs.0.func.10 =
# tree 1 (the "ADF0 body"), 1 argument = if-constraint
gp.fs.0.func.10.tree = 1 = 0

# The "ADF0 body" -- see Koza-II p. 245
gp.fs.1 = = f1 =
gp.fs.1.size = 3
gp.fs.1.func.0 = = if-constraint
gp.fs.1.func.1 = = nc0
# ARG0
gp.fs.1.func.2 =
gp.fs.1.func.2.arg = 0 # Meaning it's the first argument! = if-constraint

The error I get when running this:
Processing GP Function Sets
Incorrect number of children for ADF Argument terminal -- should be 0.
Check the constraints.
PARAMETER: gp.fs.1.func.2
     ALSO: gp.adf-argument

With = 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. = 5 or = 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?