public class AMALGAMSpecies extends FloatVectorSpecies
AMALGAMSpecies must be used in combination with AMALGAMBreeder, which will call it at appropriate times to revise the distribution and to generate a new subpopulation of individuals. Unlike CMA-ES, AMALGAM does not require its own special initializer (we use SimpleInitializer).
AMALAGAMSpecies has nine numeric parameters that you can set; five of them have standard default constant values, and four have values which, if you don't specify them, are updated every step via excessively complex equations.
AMALGAMSpecies also has an "alternative termination" option, by default turned off. Normally ECJ terminates when the optimal individual is discovered or when the generations or maximum number of evaluations has been exceeded. AMALGAM will also terminate when the "distribution multiplier" is lower than 10^(-10), or when the distribution variance is less than the fitness variance tolerance.
AMALGAMSpecies relies on the EJML matrix library, available at http://ejml.org/
Parameters
base.tau 0 <= Floating-point value <= 1 |
(proportion of elite individuals) If not provided, defaults to 0.35 |
base.variance-tolerance 0 <= Floating-point value |
(termination condition: if the variance is less than this amount) If not provided, defaults to 0.0 |
base.nis-max 0 <= Floating-point value |
(number of generations with no improvement beyond which the distribution multiplier begins to decrease) If not provided, defaults to 25 + genome size |
base.alpha-ams 0 < Floating-point value |
(the proportion of individuals to be shifted in the direction of the anticipated mean shift) If not provided, defaults to 0.5 * tau * subpopulation size / (subpopulation size - 1) |
base.delta-ams 0 < Floating-point value |
(controls how much selected individuals are shifted) If not provided, defaults to 2.0 |
base.eta-shift 0 <= Floating-point value <= 1 |
(learning rate of the anticipated mean shift) If not provided, defaults to 1.0 - (e ^ (-1.2 * (floor(tau * subpopulation size))^0.31) / (genome size ^ 0.5)) |
base.eta-sigma 0 <= Floating-point value <= 1 |
(learning rate of the covariance matrix) If not provided, defaults to 1.0 - e ^ (-1.1 * (floor(tau * subpopulation size)^1.20) / (genome size ^ 1.6)) |
base.eta-dec 0 <= Floating-point value <= 1 |
(degree to which the distribution multipler is decreased in certain conditions) If not provided, defaults to 0.9 |
base.theta-sdr 0 <= Floating-point value |
(threshold for the standard deviation ratio) If not provided, defaults to 1.0 |
base.alternative-termination boolean, default false |
Should we also terminate on AMALGAM's additional termination conditions?. |
Default Base
eda.amalgam.species
Modifier and Type | Field and Description |
---|---|
org.ejml.data.DenseMatrix64F |
aggCovarMatrix |
double |
alphaAMS |
org.ejml.data.DenseMatrix64F |
choleskyLower |
java.util.IdentityHashMap<Individual,java.lang.Integer> |
constraintViolations |
org.ejml.data.DenseMatrix64F |
covarMatrix |
double |
deltaAMS |
double |
distributionMultiplier |
double |
distributionMultiplierDecrease |
double |
distributionMultiplierIncrease |
double |
etaP |
double |
etaS |
boolean |
firstGeneration |
double |
fitnessVarianceTolerance |
org.ejml.data.DenseMatrix64F |
genCovarMatrix |
int |
maximumNoImprovementStretch |
org.ejml.data.DenseMatrix64F |
mean
The mean of the distribution.
|
org.ejml.data.DenseMatrix64F |
meanShift |
int |
noImprovementStretch |
static java.lang.String |
P_ALPHA_AMS |
static java.lang.String |
P_ALTERNATIVE_TERMINATION |
static java.lang.String |
P_AMALGAM_SPECIES |
static java.lang.String |
P_DELTA_AMS |
static java.lang.String |
P_ETA_DEC |
static java.lang.String |
P_ETA_SHIFT |
static java.lang.String |
P_ETA_SIGMA |
static java.lang.String |
P_NIS_MAX |
static int |
P_PARAMETER_MISSING |
static java.lang.String |
P_TAU |
static java.lang.String |
P_THETA_SDR |
static java.lang.String |
P_VARIANCE_TOLERANCE |
org.ejml.data.DenseMatrix64F |
prevMean |
double |
stDevRatioThresh |
double |
tau |
org.ejml.data.DenseMatrix64F |
temp |
org.ejml.data.DenseMatrix64F |
temp2 |
org.ejml.data.DenseMatrix64F |
temp3 |
org.ejml.data.DenseMatrix64F |
tempMatrix |
boolean |
useAltTermination |
double |
userAlphaAMS |
double |
userEtaP |
double |
userEtaS |
org.ejml.data.DenseMatrix64F |
xAvgImp |
C_GAUSS_MUTATION, C_INTEGER_RANDOM_WALK_MUTATION, C_INTEGER_RESET_MUTATION, C_POLYNOMIAL_MUTATION, C_RESET_MUTATION, DEFAULT_OUT_OF_BOUNDS_RETRIES, gaussMutationStdev, maxGene, minGene, mutationDistributionIndex, mutationIsBounded, mutationType, outOfBoundsRetries, P_MAXGENE, P_MINGENE, P_MUTATION_BOUNDED, P_MUTATION_DISTRIBUTION_INDEX, P_MUTATIONTYPE, P_OUTOFBOUNDS_RETRIES, P_POLYNOMIAL_ALTERNATIVE, P_RANDOM_WALK_PROBABILITY, P_STDEV, polynomialIsAlternative, randomWalkProbability, V_GAUSS_MUTATION, V_INTEGER_RANDOM_WALK_MUTATION, V_INTEGER_RESET_MUTATION, V_POLYNOMIAL_MUTATION, V_RESET_MUTATION
C_ANY_POINT, C_GEOMETRIC, C_INTERMED_RECOMB, C_LINE_RECOMB, C_NONE, C_ONE_POINT, C_ONE_POINT_NO_NOP, C_SIMULATED_BINARY, C_TWO_POINT, C_TWO_POINT_NO_NOP, C_UNIFORM, chunksize, crossoverDistributionIndex, crossoverProbability, crossoverType, duplicateRetries, dynamicInitialSize, genomeIncreaseProbability, genomeResizeAlgorithm, genomeSize, lineDistance, maxInitialSize, minInitialSize, mutationProbability, P_CHUNKSIZE, P_CROSSOVER_DISTRIBUTION_INDEX, P_CROSSOVERPROB, P_CROSSOVERTYPE, P_DUPLICATE_RETRIES, P_GENOMESIZE, P_GEOMETRIC_PROBABILITY, P_LINEDISTANCE, P_MUTATIONPROB, P_NUM_SEGMENTS, P_SEGMENT, P_SEGMENT_END, P_SEGMENT_START, P_SEGMENT_TYPE, P_UNIFORM_MAX, P_UNIFORM_MIN, P_VECTORSPECIES, V_ANY_POINT, V_GEOMETRIC, V_INTERMED_RECOMB, V_LINE_RECOMB, V_ONE_POINT, V_ONE_POINT_NO_NOP, V_SIMULATED_BINARY, V_TWO_POINT, V_TWO_POINT_NO_NOP, V_UNIFORM
f_prototype, i_prototype, P_FITNESS, P_INDIVIDUAL, P_PIPE, pipe_prototype
Constructor and Description |
---|
AMALGAMSpecies() |
Modifier and Type | Method and Description |
---|---|
void |
adaptDistributionMultiplier(EvolutionState state,
Subpopulation subpop) |
boolean |
checkTerminationConditions(EvolutionState state,
Subpopulation subpop) |
java.lang.Object |
clone()
Creates a new individual cloned from a prototype,
and suitable to begin use in its own evolutionary
context.
|
int |
compareIndividuals(Individual a,
Individual b) |
void |
computeAMS(EvolutionState state,
Subpopulation subpop) |
void |
computeConstraintViolations(EvolutionState state,
Subpopulation subpop) |
void |
computeCovariance(EvolutionState state,
Subpopulation subpop) |
void |
computeMean(EvolutionState state,
Subpopulation subpop) |
Parameter |
defaultBase()
Returns the default base for this prototype.
|
boolean |
isValid(DoubleVectorIndividual dvind) |
Individual |
newIndividual(EvolutionState state,
int thread)
Provides a brand-new individual to fill in a population.
|
void |
selectForDiversity(EvolutionState state,
Subpopulation subpop) |
void |
setup(EvolutionState state,
Parameter base)
The default version of setup(...) loads requested pipelines and calls setup(...) on them and normalizes their probabilities.
|
void |
shiftIndividual(EvolutionState state,
DoubleVectorIndividual ind) |
void |
updateDistribution(EvolutionState state,
Subpopulation subpop) |
gaussMutationStdev, inNumericalTypeRange, loadParametersForGene, maxGene, minGene, mutationDistributionIndex, mutationIsBounded, mutationType, outOfRangeRetryLimitReached, polynomialIsAlternative, randomWalkProbability
contains, contains, contains, contains, duplicateRetries, fill, fill, fill, fill, initializeGenomeSegmentsByEndIndices, initializeGenomeSegmentsByStartIndices, mutationProbability, setupGenome
buildMisc, newIndividual, newIndividual, updateIndividual, updateSubpopulation
public static final java.lang.String P_AMALGAM_SPECIES
public static final java.lang.String P_TAU
public static final java.lang.String P_ETA_DEC
public static final java.lang.String P_THETA_SDR
public static final java.lang.String P_ETA_SHIFT
public static final java.lang.String P_ETA_SIGMA
public static final java.lang.String P_NIS_MAX
public static final java.lang.String P_VARIANCE_TOLERANCE
public static final java.lang.String P_DELTA_AMS
public static final java.lang.String P_ALPHA_AMS
public static final java.lang.String P_ALTERNATIVE_TERMINATION
public static final int P_PARAMETER_MISSING
public boolean useAltTermination
public double tau
public double fitnessVarianceTolerance
public int maximumNoImprovementStretch
public int noImprovementStretch
public double alphaAMS
public double userAlphaAMS
public double deltaAMS
public double etaP
public double userEtaP
public double etaS
public double userEtaS
public double distributionMultiplierDecrease
public double distributionMultiplierIncrease
public double distributionMultiplier
public double stDevRatioThresh
public org.ejml.data.DenseMatrix64F mean
public org.ejml.data.DenseMatrix64F prevMean
public org.ejml.data.DenseMatrix64F xAvgImp
public org.ejml.data.DenseMatrix64F meanShift
public org.ejml.data.DenseMatrix64F genCovarMatrix
public org.ejml.data.DenseMatrix64F aggCovarMatrix
public org.ejml.data.DenseMatrix64F covarMatrix
public org.ejml.data.DenseMatrix64F choleskyLower
public org.ejml.data.DenseMatrix64F temp
public org.ejml.data.DenseMatrix64F temp2
public org.ejml.data.DenseMatrix64F temp3
public org.ejml.data.DenseMatrix64F tempMatrix
public java.util.IdentityHashMap<Individual,java.lang.Integer> constraintViolations
public boolean firstGeneration
public Parameter defaultBase()
Prototype
defaultBase
in interface Prototype
defaultBase
in class VectorSpecies
public void setup(EvolutionState state, Parameter base)
Species
setup
in interface Prototype
setup
in interface Setup
setup
in class FloatVectorSpecies
Prototype.setup(EvolutionState,Parameter)
public java.lang.Object clone()
Prototype
Typically this should be a full "deep" clone. However, you may share certain elements with other objects rather than clone hem, depending on the situation:
Implementations.
public Object clone()
{
try
{
return super.clone();
}
catch ((CloneNotSupportedException e)
{ throw new InternalError(); } // never happens
}
public Object clone()
{
try
{
MyObject myobj = (MyObject) (super.clone());
// put your deep-cloning code here...
}
catch ((CloneNotSupportedException e)
{ throw new InternalError(); } // never happens
return myobj;
}
public Object clone()
{
MyObject myobj = (MyObject) (super.clone());
// put your deep-cloning code here...
return myobj;
}
public void computeConstraintViolations(EvolutionState state, Subpopulation subpop)
public int compareIndividuals(Individual a, Individual b)
public boolean isValid(DoubleVectorIndividual dvind)
public Individual newIndividual(EvolutionState state, int thread)
Species
newIndividual
in class VectorSpecies
public void adaptDistributionMultiplier(EvolutionState state, Subpopulation subpop)
public void selectForDiversity(EvolutionState state, Subpopulation subpop)
public void computeMean(EvolutionState state, Subpopulation subpop)
public void computeCovariance(EvolutionState state, Subpopulation subpop)
public void computeAMS(EvolutionState state, Subpopulation subpop)
public void updateDistribution(EvolutionState state, Subpopulation subpop)
public boolean checkTerminationConditions(EvolutionState state, Subpopulation subpop)
public void shiftIndividual(EvolutionState state, DoubleVectorIndividual ind)