ECJ-INTEREST-L Archives

December 2005

ECJ-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

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

Print Reply
Sender:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Date:
Thu, 8 Dec 2005 15:12:20 -0500
MIME-version:
1.0 (Apple Message framework v728)
Reply-To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Content-type:
text/plain; charset=US-ASCII; delsp=yes; format=flowed
Subject:
From:
Sean Luke <[log in to unmask]>
In-Reply-To:
Content-transfer-encoding:
7bit
Comments:
To: ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (39 lines)
It depends on how you want to do loops.  What do you mean by
automatically-defined-loops exactly?  It seems to me that the
straightforward way is to just have a loop macro as one of your
nodes, whose eval() method looks something like this:

     result = empty
     n = eval first child
     loop n times or until MAX_ALLOWED_LOOPS:
         result = eval second child
     return result

Or you could have a while loop along these lines:

     count = 0;
     loop up to MAX_ALLOWED_LOOPS:
         n = eval first child
         if n == true then eval second child and return
     return empty

Sean

On Dec 7, 2005, at 7:55 PM, George Coles wrote:

> Hi,
>    Can anyone point me to an example of automatically defined loops
> that works with tree-based GP? Has anyone implemented loops in ECJ?
> I am
> contemplating beginning to add this feature to my copy of ECJ and it
> seems a bit daunting. Could the ADF stack be leveraged somehow to do
> this? As an aside, it seems odd that iteration and recursion are not
> more popular as a topic of discussion. I expect that I will really
> need
> iteration, at least, in my project, and I would think that many people
> would find it very valuable.
>
> Thanks
> George Coles
>

ATOM RSS1 RSS2