ECJ-INTEREST-L Archives

February 2009

ECJ-INTEREST-L@LISTSERV.GMU.EDU

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
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
Date:
Thu, 26 Feb 2009 11:25:28 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (62 lines)
Eric, I'm pretty sure that you may be misunderstanding here.  In the 
example listed below, the node labeled "ADF" would be an *ADF* class,
not an *ADFArgument* class. The (in this case: one) ADFArgument node
would not be in the function set of the result-producing branch, but in
the ADF branch.

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))

When the adfargument0 terminal is called, it returns the value of foo0.
    Ultimately the ADF tree returns a value, let's say it's 'bar'.
Control then returns to the result branch and the 'adf' node returns the
value bar, and we continue on our merry way.

Sean

Eric B wrote:
> On Wed, 25 Feb 2009 15:08:05 -0500, Sean Luke <[log in to unmask]> wrote:
>
>> It looks like your function sets are all messed up. You don't seem to
>> have ADFArgument nodes in the function set of the ADF tree you created.
>> And you may be using types (it's not clear) but are missing
>> nonterminals entirely for a certain function set. Perhaps gp.fs.0.size
>> or gp.fs.1.size or whatnot has the wrong number?
>>
>> Take a look not at the lawnmower problem but the two-box problem, which
>> actually has an ADF that takes some arguments.
>>
>> Sean
>
>
> I don't want to use ADFArgument because with ADFArugment only terminals are
> accapted as argument. It's in the code of ADFArgument itself!
> What I want is an ADF that takes as argument a subtree! I know the type of
> the root of that tree (it's the If function which takes 3 arguments). So
> basically I want to be able to have the following trees.
>
> This is the result producing branch:
>
> if
> |
> -----------------------------
> | | |
> xx ADF xy
> |
> if
> |
> ----------
> | | |
> yx yy yz
>
> I hope the lay out won't be messed up.

ATOM RSS1 RSS2