|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Species
ec.vector.VectorSpecies
ec.vector.FloatVectorSpecies
FloatVectorSpecies is a subclass of VectorSpecies with special constraints for floating-point vectors, namely FloatVectorIndividual and DoubleVectorIndividual.
FloatVectorSpecies can specify numeric constraints on gene values in one of two ways. First, they can simply specify a default min and max value. Or they can specify an array of min/max pairs, one pair per gene. FloatVectorSpecies will check to see if the second approach is to be used by looking for parameter base.max-gene.0 in the array -- if it exists, FloatvectorSpecies will assume all such parameters exist, and will load up to the genome length. If a parameter is missing, in this range, a warning will be issued during Individual setup. If the array is shorter than the genome, then the default min/max values will be used for the remaining genome values. This means that even if you specify the array, you need to still specify the default min/max values just in case.
FloatVectorSpecies provides support for two ways of mutating a gene:
Parameters
base.min-gene double (default=0.0) |
(the minimum gene value) |
base.max-gene double >= base.min-gene |
(the maximum gene value) |
base.min-gene.i double (default=base.min-gene) |
(the minimum gene value for gene i) |
base.max-gene.i double >= base.min-gene.i (default=base.max-gene) |
(the maximum gene value for gene i) |
base.mutation-type reset or gauss (default=reset) |
(the mutation type) |
base.mutation-stdev double ≥ 0 |
(the standard deviation or the gauss perturbation) |
base.out-of-bounds-retries int ≥ 0 (default=100) |
(number of times the gaussian mutation got the gene out of range before we give up and reset the gene's value; 0 means "never give up") |
Field Summary | |
static int |
C_GAUSS_MUTATION
|
static int |
C_RESET_MUTATION
|
double |
gaussMutationStdev
|
double[] |
gaussMutationStdevs
Set to null if not specified If individualGeneMinMaxUsed, that this is used too. |
double |
maxGene
|
double[] |
maxGenes
Set to null if not specified |
double |
minGene
|
double[] |
minGenes
Set to null if not specified |
int |
mutationType
What kind of mutation do we have? |
int |
outOfRangeRetries
|
static java.lang.String |
P_MAXGENE
|
static java.lang.String |
P_MINGENE
|
static java.lang.String |
P_MUTATIONTYPE
|
static java.lang.String |
P_OUTOFBOUNDS_RETRIES
|
static java.lang.String |
P_STDEV
|
static java.lang.String |
V_GAUSS_MUTATION
|
static java.lang.String |
V_RESET_MUTATION
|
Fields inherited from class ec.vector.VectorSpecies |
C_ANY_POINT, C_ONE_POINT, C_TWO_POINT, chunksize, crossoverProbability, crossoverType, genomeSize, mutationProbability, P_CHUNKSIZE, P_CROSSOVERPROB, P_CROSSOVERTYPE, P_GENOMESIZE, P_MUTATIONPROB, P_VECTORSPECIES, V_ANY_POINT, V_ONE_POINT, V_TWO_POINT |
Fields inherited from class ec.Species |
i_prototype, P_INDIVIDUAL, P_PIPE, pipe_prototype |
Constructor Summary | |
FloatVectorSpecies()
|
Method Summary | |
double |
gaussMutationStdev(int gene)
|
boolean |
individualGeneMinMaxUsed()
|
boolean |
inRange(double geneVal)
|
double |
maxGene(int gene)
|
double |
minGene(int gene)
|
void |
outOfRangeRetryLimitReached(EvolutionState state)
|
void |
setup(EvolutionState state,
Parameter base)
The default version of setup(...) loads requested pipelines and calls setup(...) on them and normalizes their probabilities. |
Methods inherited from class ec.vector.VectorSpecies |
defaultBase, newIndividual |
Methods inherited from class ec.Species |
newIndividual, newIndividual, protoClone, protoCloneSimple |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String P_MINGENE
public static final java.lang.String P_MAXGENE
public static final java.lang.String P_MUTATIONTYPE
public static java.lang.String P_STDEV
public static final java.lang.String V_RESET_MUTATION
public static final java.lang.String V_GAUSS_MUTATION
public static final int C_RESET_MUTATION
public static final int C_GAUSS_MUTATION
public static final java.lang.String P_OUTOFBOUNDS_RETRIES
public double minGene
public double maxGene
public double[] minGenes
public double[] maxGenes
public int mutationType
public double gaussMutationStdev
public double[] gaussMutationStdevs
public int outOfRangeRetries
Constructor Detail |
public FloatVectorSpecies()
Method Detail |
public void outOfRangeRetryLimitReached(EvolutionState state)
public final boolean individualGeneMinMaxUsed()
public final double maxGene(int gene)
public final double minGene(int gene)
public final double gaussMutationStdev(int gene)
public boolean inRange(double geneVal)
public void setup(EvolutionState state, Parameter base)
Species
setup
in interface Prototype
setup
in class VectorSpecies
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |