Package ec.gp.koza

Class KozaBuilder

java.lang.Object
ec.gp.GPNodeBuilder
ec.gp.koza.KozaBuilder
All Implemented Interfaces:
Prototype, Setup, Serializable, Cloneable
Direct Known Subclasses:
FullBuilder, GrowBuilder, HalfBuilder

public abstract class KozaBuilder extends GPNodeBuilder
See Also:
  • Field Details

    • P_MAXDEPTH

      public static final String P_MAXDEPTH
      See Also:
    • P_MINDEPTH

      public static final String P_MINDEPTH
      See Also:
    • maxDepth

      public int maxDepth
      The largest maximum tree depth RAMPED HALF-AND-HALF can specify.
    • minDepth

      public int minDepth
      The smallest maximum tree depth RAMPED HALF-AND-HALF can specify.
  • Constructor Details

    • KozaBuilder

      public KozaBuilder()
  • Method Details

    • setup

      public void setup(EvolutionState state, Parameter base)
      Description copied from interface: Prototype
      Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.

      For prototypes, setup(...) is typically called once for the prototype instance; cloned instances do not receive the setup(...) call. setup(...) may be called more than once; the only guarantee is that it will get called at least once on an instance or some "parent" object from which it was ultimately cloned.

      Specified by:
      setup in interface Prototype
      Specified by:
      setup in interface Setup
      Overrides:
      setup in class GPNodeBuilder
    • fullNode

      protected GPNode fullNode(EvolutionState state, int current, int max, GPType type, int thread, GPNodeParent parent, int argposition, GPFunctionSet set)
      A private recursive method which builds a FULL-style tree for newRootedTree(...)
    • growNode

      protected GPNode growNode(EvolutionState state, int current, int max, GPType type, int thread, GPNodeParent parent, int argposition, GPFunctionSet set)
      A private function which recursively returns a GROW tree to newRootedTree(...)