Package ec.gp

Class GPInitializer

All Implemented Interfaces:
Setup, Singleton, Serializable

public class GPInitializer extends SimpleInitializer
GPInitializer is a SimpleInitializer which sets up all the Cliques, ( the initial [tree/node]constraints, types, and function sets) for the GP system.

Note that the Cliques must be set up in a very particular order:

  1. GPType
  2. GPNodeConstraints
  3. GPFunctionSets
  4. GPTreeConstraints

Parameter bases

gp.type GPTypes
gp.nc GPNodeConstraints
gp.tc GPTreeConstraints
gp.fs GPFunctionSets
See Also:
  • Field Details

  • Constructor Details

    • GPInitializer

      public GPInitializer()
  • Method Details

    • setup

      public void setup(EvolutionState state, Parameter base)
      Description copied from interface: Setup
      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.
      Specified by:
      setup in interface Setup
      Overrides:
      setup in class SimpleInitializer
    • setupTypes

      public void setupTypes(EvolutionState state, Parameter base)
      Sets up all the types, loading them from the parameter file. This must be called before anything is called which refers to a type by name.
    • postProcessTypes

      public void postProcessTypes()
      Assigns unique integers to each atomic type, and sets up compatibility arrays for set types. If you add new types (heaven forbid), you should call this method again to get all the types set up properly. However, you will have to set up the function sets again as well, as their arrays are based on these type numbers.
    • setupNodeConstraints

      public void setupNodeConstraints(EvolutionState state, Parameter base)
      Sets up all the GPNodeConstraints, loading them from the parameter file. This must be called before anything is called which refers to a type by name.
    • setupFunctionSets

      public void setupFunctionSets(EvolutionState state, Parameter base)
    • setupTreeConstraints

      public void setupTreeConstraints(EvolutionState state, Parameter base)
      Sets up all the GPTreeConstraints, loading them from the parameter file. This must be called before anything is called which refers to a type by name.