Class NeatChromosomeConnectionWeightMutationHandler
java.lang.Object
net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeConnectionWeightMutationHandler
- All Implemented Interfaces:
ChromosomeMutationHandler<NeatChromosome>
public class NeatChromosomeConnectionWeightMutationHandler
extends Object
implements ChromosomeMutationHandler<NeatChromosome>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.apache.logging.log4j.Logger
private final RandomGenerator
-
Constructor Summary
ConstructorDescriptionNeatChromosomeConnectionWeightMutationHandler
(RandomGenerator _randomGenerator) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canHandle
(MutationPolicy mutationPolicy, ChromosomeSpec chromosome) mutate
(MutationPolicy mutationPolicy, Chromosome chromosome) protected Connection
mutateConnection
(Connection connection, double perturbationRatio, Supplier<Float> distributionValueSupplier, Supplier<Float> distributionNewValueSupplier, float minValue, float maxValue) protected float
perturbateWeight
(float weight, float disturbance, float minValue, float maxValue)
-
Field Details
-
logger
public static final org.apache.logging.log4j.Logger logger -
randomGenerator
-
-
Constructor Details
-
NeatChromosomeConnectionWeightMutationHandler
-
-
Method Details
-
canHandle
- Specified by:
canHandle
in interfaceChromosomeMutationHandler<NeatChromosome>
-
perturbateWeight
protected float perturbateWeight(float weight, float disturbance, float minValue, float maxValue) -
mutateConnection
protected Connection mutateConnection(Connection connection, double perturbationRatio, Supplier<Float> distributionValueSupplier, Supplier<Float> distributionNewValueSupplier, float minValue, float maxValue) -
mutate
- Specified by:
mutate
in interfaceChromosomeMutationHandler<NeatChromosome>
-