Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#1245 closed defect (duplicate)

GP subtree crossover throws exception

Reported by: swinkler Owned by: gkronber
Priority: medium Milestone: HeuristicLab 3.3.3
Component: Encodings.SymbolicExpressionTreeEncoding Version: 3.3.3
Keywords: Cc:

Description (last modified by gkronber)

An exception was thrown by the operator "SubtreeCrossover": The interval [0, 0) is empty. This can be reproduced by opening the GP example for symbolic regession and setting the maximum tree height to 3 and the maximum tree size to 25; after starting the algorithm this exception is thrown.

Change History (6)

comment:1 Changed 12 years ago by gkronber

Also reported by a student:

Island Offspring Alg.. MaxExpressionDepth: 3 MaxExpressionLenght: 25

Configuration works in HL 2.5

MaxExpressionDepth > 3 works

comment:2 Changed 12 years ago by gkronber

  • Description modified (diff)

In version 3.3 we added support for automatically defined functions (ADF). Because of this the tree structure has following shape:

                /  |   \
               /   |    \
              /    |     \
            RPB   ADF0...ADFn
           / | \  / | \  / | \

 (root (Result-production-branch (#)) (ADF0 #) (ADF1 #) ...)

This means the minimal depth of a functional tree only containing one terminal is three and the minimal size is also three.


   const 3.14

A max tree depth of three in HL 3.3 is thus equivalent to a max. tree depth of one in HL 2.5 which is too small to be useful.

A workaround for this problem is to use tree depths larger or equal five.

In any case the parameter setting is confusing because a user does not immediately know about the template shape necessary for ADFs. So this parameter setting should be documented better in the GUI.

Tree creation does not fail because PTC2 is the default for symbolic regression. Our implementation of PTC2 has a small chance to produce trees that are larger than the max depth and we decided that the max depth limit constraint is not enforced in the initial population.

Ideally the range for the values of this parameters should be limited and enforced in the GUI, however, there is not yet a general mechanism for this in HL. Actually a similar bug can be produced by setting the population size in any GA to a value smaller than one.

Last edited 12 years ago by gkronber (previous) (diff)

comment:3 Changed 12 years ago by gkronber

  • Component changed from ZZZ OBSOLETE: GP.StructureIdentification to Encodings.SymbolicExpressionTreeEncoding

comment:4 Changed 12 years ago by gkronber

  • Milestone changed from HeuristicLab x.x.x to HeuristicLab 3.3.3
  • Version changed from 3.3 to 3.3.2

comment:5 Changed 11 years ago by gkronber

  • Resolution set to duplicate
  • Status changed from new to closed

This ticket has been resolved together with #1315

comment:6 Changed 11 years ago by swagner

  • Version changed from 3.3.2 to 3.3.3
Note: See TracTickets for help on using tickets.