Package net.bmahe.genetics4j.gp.spec
Class GPEAExecutionContexts
java.lang.Object
net.bmahe.genetics4j.gp.spec.GPEAExecutionContexts
Defines multiple factory and helper methods to create and manage
EAExecutionContexts appropriate for Genetic Programming
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Comparable<T>>
ImmutableEAExecutionContext.Builder<T> forGP
(RandomGenerator randomGenerator) Create a new EAExecutionContext pre-configured to support Genetic Programming.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.
-
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 GeneratorprogramHelper
- Instance of ProgramHelperprogramGenerator
- 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
-