Package net.bmahe.genetics4j.core
Class EASystem<T extends Comparable<T>>
java.lang.Object
net.bmahe.genetics4j.core.EASystem<T>
- Type Parameters:
T
-
Main class used to manage and execute the evolution process
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List
<ChromosomeCombinator<T>> private final ChromosomeFactoryProvider
private final AbstractEAConfiguration
<T> private final AbstractEAExecutionContext
<T> private final FitnessEvaluator
<T> private final GenotypeGenerator
<T> static final org.apache.logging.log4j.Logger
private final double
private final int
private final ReplacementStrategyImplementor
<T> -
Constructor Summary
ConstructorDescriptionEASystem
(AbstractEAConfiguration<T> _eaConfiguration, long _populationSize, List<ChromosomeCombinator<T>> _chromosomeCombinators, double _offspringRatio, Selector<T> _parentSelectionPolicyHandler, List<Mutator> _mutators, ReplacementStrategyImplementor<T> _replacementStrategyImplementor, AbstractEAExecutionContext<T> _eaExecutionContext, FitnessEvaluator<T> _fitnessEvaluator) -
Method Summary
Modifier and TypeMethodDescriptioncombineParents
(Population<T> parents, GenotypeCombinator genotypeCombinator) createBasicOffsprings
(Population<T> population, int offspringsNeeded) Create offsprings without mutationcreateOffsprings
(Population<T> population, int offspringsNeeded) evaluateOnce
(long generation, List<Genotype> genotypes) evolve()
Triggers the evolutionary processlong
mutateGenotypes
(List<Genotype> genotypes)
-
Field Details
-
logger
public static final org.apache.logging.log4j.Logger logger -
genotypeGenerator
-
fitnessEvaluator
-
eaConfiguration
-
eaExecutionContext
-
populationSize
private final int populationSize -
chromosomeCombinators
-
chromosomeFactoryProvider
-
replacementStrategyImplementor
private final ReplacementStrategyImplementor<T extends Comparable<T>> replacementStrategyImplementor -
mutators
-
offspringRatio
private final double offspringRatio -
parentSelector
-
-
Constructor Details
-
EASystem
public EASystem(AbstractEAConfiguration<T> _eaConfiguration, long _populationSize, List<ChromosomeCombinator<T>> _chromosomeCombinators, double _offspringRatio, Selector<T> _parentSelectionPolicyHandler, List<Mutator> _mutators, ReplacementStrategyImplementor<T> _replacementStrategyImplementor, AbstractEAExecutionContext<T> _eaExecutionContext, FitnessEvaluator<T> _fitnessEvaluator)
-
-
Method Details
-
evaluate
-
initializePopulation
-
mutateGenotypes
-
combineParents
-
createBasicOffsprings
Create offsprings without mutation- Parameters:
population
-offspringsNeeded
-- Returns:
-
getEAConfiguration
-
getPopulationSize
public long getPopulationSize() -
createOffsprings
-
evolve
Triggers the evolutionary process- Returns:
-
evaluateOnce
-