Print

Print


On Jun 24, 2015, at 10:03 AM, Pedro J. Ponce de León <[log in to unmask]> wrote:

> I'm trying to setup ECJ to evolve GP trees with a minimum depth with the following node types/constraints:
> 
> - RootNode 
> (Section, Section) -> Melody  # (child1, child2) -> return type
> 
> - SectionNode 
> (Measure | Section, Measure | Section) -> Section

FULL and GROW work by picking nonterminals up to a point, then terminals.  But you have no terminal which returns Section, hence the warning.  Thus it's possible that FULL or GROW will keep on picking a nonterminal forever and ever.  Just because it is *possible* for ECJ to select a MeasureNode as a child here, then four Symbols, doesn't mean that it will do so randomly.

The fundamental problem here is that ECJ's typing is greedy (it has to be to accommodate most tree generation algorithms).  What you're asking for in FULL and GROW is not really possible.

Sean