Class GPEAExecutionContexts

java.lang.Object
net.bmahe.genetics4j.gp.spec.GPEAExecutionContexts

public class GPEAExecutionContexts extends Object
Defines multiple factory and helper methods to create and manage EAExecutionContexts appropriate for Genetic Programming
  • Constructor Details

    • GPEAExecutionContexts

      private GPEAExecutionContexts()
  • Method Details

    • forGP

      public static <T extends Comparable<T>> ImmutableEAExecutionContext.Builder<T> forGP(RandomGenerator randomGenerator, ProgramHelper programHelper, ProgramGenerator programGenerator)
      Create a new EAExecutionContext pre-configured to support Genetic Programming.

      It adds support for some operators to select, mutate and combine programs.

      Type Parameters:
      T - Type of the fitness measurement
      Parameters:
      randomGenerator - Random Generator
      programHelper - Instance of ProgramHelper
      programGenerator - Instance of a program generator which will be used to generate individuals
      Returns:
      A new instance of a EAExecutionContext
    • forGP

      public static <T extends Comparable<T>> ImmutableEAExecutionContext.Builder<T> forGP(RandomGenerator randomGenerator)
      Create a new EAExecutionContext pre-configured to support Genetic Programming.

      It adds support for some operators to select, mutate and combine programs. It also configure a default program generation based on ramped hald and half.

      Type Parameters:
      T - Type of the fitness measurement
      Parameters:
      randomGenerator - Random Generator
      Returns:
      A new instance of a EAExecutionContext