public class IntegerVectorSpecies extends VectorSpecies
IntegerVectorSpecies can specify a number of parameters globally, per-segment, and per-gene. See VectorSpecies for information on how to this works.
IntegerVectorSpecies defines a minimum and maximum gene value. These values are used during initialization and, depending on whether mutation-bounded is true, also during various mutation algorithms to guarantee that the gene value will not exceed these minimum and maximum bounds.
IntegerVectorSpecies provides support for two ways of mutating a gene.
IntegerVectorSpecies performs gene initialization by resetting the gene.
Parameters
| base.min-gene or | |
| base.segment.segment-number.min-gene or | |
| base.min-gene.gene-number long (default=0) |
(the minimum gene value) |
| base.max-gene or | |
| base.segment.segment-number.max-gene or | |
| base.max-gene.gene-number long >= base.min-gene |
(the maximum gene value) |
| base.mutation-type or | |
| base.segment.segment-number.mutation-type or | |
| base.mutation-prob.gene-number reset or random-walk (default=reset) |
(the mutation type) |
| base.random-walk-probability or | |
| base.segment.segment-number.random-walk-probability or | |
| base.random-walk-probability.gene-number 0.0 <= double <= 1.0 |
(the probability that a random walk will continue. Random walks go up or down by 1.0 until the coin flip comes up false.) |
| base.mutation-bounded or | |
| base.segment.segment-number.mutation-bounded or | |
| base.mutation-bounded.gene-number boolean (default=true) |
(whether mutation is restricted to only being within the min/max gene values. Does not apply to SimulatedBinaryCrossover (which is always bounded)) |
| Modifier and Type | Field and Description |
|---|---|
static int |
C_RANDOM_WALK_MUTATION |
static int |
C_RESET_MUTATION |
protected long[] |
maxGene
Max-gene value, per gene.
|
protected long[] |
minGene
Min-gene value, per gene.
|
protected boolean[] |
mutationIsBounded
Whether mutation is bounded to the min- and max-gene values, per gene.
|
(package private) boolean |
mutationIsBoundedDefined
Whether the mutationIsBounded value was defined, per gene.
|
protected int[] |
mutationType
Mutation type, per gene.
|
static String |
P_MAXGENE |
static String |
P_MINGENE |
static String |
P_MUTATION_BOUNDED |
static String |
P_MUTATIONTYPE |
static String |
P_NUM_SEGMENTS |
static String |
P_RANDOM_WALK_PROBABILITY |
static String |
P_SEGMENT |
static String |
P_SEGMENT_END |
static String |
P_SEGMENT_START |
static String |
P_SEGMENT_TYPE |
protected double[] |
randomWalkProbability
The continuation probability for Integer Random Walk Mutation, per gene.
|
static String |
V_RANDOM_WALK_MUTATION |
static String |
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_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_UNIFORMf_prototype, i_prototype, P_FITNESS, P_INDIVIDUAL, P_PIPE, pipe_prototype| Constructor and Description |
|---|
IntegerVectorSpecies() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
inNumericalTypeRange(double geneVal) |
boolean |
inNumericalTypeRange(long geneVal) |
protected void |
loadParametersForGene(EvolutionState state,
int index,
Parameter base,
Parameter def,
String postfix)
Called when VectorSpecies is setting up per-gene and per-segment parameters.
|
long |
maxGene(int gene) |
long |
minGene(int gene) |
boolean |
mutationIsBounded(int gene) |
int |
mutationType(int gene) |
double |
randomWalkProbability(int gene) |
void |
setup(EvolutionState state,
Parameter base)
The default version of setup(...) loads requested pipelines and calls setup(...) on them and normalizes their probabilities.
|
contains, contains, contains, contains, defaultBase, duplicateRetries, fill, fill, fill, fill, initializeGenomeSegmentsByEndIndices, initializeGenomeSegmentsByStartIndices, mutationProbability, newIndividual, setupGenomeclone, newIndividual, newIndividualpublic static final String P_MINGENE
public static final String P_MAXGENE
public static final String P_NUM_SEGMENTS
public static final String P_SEGMENT_TYPE
public static final String P_SEGMENT_START
public static final String P_SEGMENT_END
public static final String P_SEGMENT
public static final String P_MUTATIONTYPE
public static final String P_RANDOM_WALK_PROBABILITY
public static final String P_MUTATION_BOUNDED
public static final String V_RESET_MUTATION
public static final String V_RANDOM_WALK_MUTATION
public static final int C_RESET_MUTATION
public static final int C_RANDOM_WALK_MUTATION
protected long[] minGene
protected long[] maxGene
protected int[] mutationType
protected double[] randomWalkProbability
protected boolean[] mutationIsBounded
boolean mutationIsBoundedDefined
public long maxGene(int gene)
public long minGene(int gene)
public int mutationType(int gene)
public double randomWalkProbability(int gene)
public boolean mutationIsBounded(int gene)
public boolean inNumericalTypeRange(double geneVal)
public boolean inNumericalTypeRange(long geneVal)
public void setup(EvolutionState state, Parameter base)
Speciessetup in interface Prototypesetup in interface Setupsetup in class VectorSpeciesPrototype.setup(EvolutionState,Parameter)protected void loadParametersForGene(EvolutionState state, int index, Parameter base, Parameter def, String postfix)
VectorSpeciesIf you override this method, be sure to call super(...) at some point, ideally first.
loadParametersForGene in class VectorSpeciesCopyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.