ECJ-INTEREST-L Archives

February 2014

ECJ-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text 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:
Tue, 11 Feb 2014 15:15:44 -0500
MIME-version:
1.0 (Mac OS X Mail 7.1 \(1827\))
Reply-To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Content-type:
text/plain; charset=us-ascii
Subject:
From:
Sean Luke <[log in to unmask]>
In-Reply-To:
Content-Transfer-Encoding:
8bit
Parts/Attachments:
text/plain (25 lines)
Tomas, ECJ does not have built-in support for nonterminals with variable numbers of children, but it has sufficient hooks that you can do it yourself.  The big issue is in the tree-generation algorithms: all of the built-in tree generators assume fixed and predefined numbers of node constraints.  This means you'll need to create your own tree-generation algorithm.

Assuming your tree-generation algorithm is ignoring the tree constraints, you can then set the GP tree's number of children to CHILDREN_UNKNOWN in your particular GPNode.

Sean

On Feb 11, 2014, at 12:44 PM, Tomas nikima <[log in to unmask]> wrote:

> I want to define a non-terminal node in GP that can have different number of
> children. For example, in a case it has two children, and in another case 5
> children. However, it must have at least one child.
> 
> I tried to define a constrain with no size, but it does not work.
> 
> #No size is set
> gp.nc.1 = ec.gp.GPNodeConstraints
> gp.nc.1.name = undefinedChildren
> gp.nc.1.returns = nil
> 
> Please let me know how can I define a node capable of having different
> number of children.
> 
> Thanks.
> Tomas.

ATOM RSS1 RSS2