|
|||||||||
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
public class FloatVectorSpecies
FloatVectorSpecies is a subclass of VectorSpecies with special constraints for floating-point vectors, namely FloatVectorIndividual and DoubleVectorIndividual.
FloatVectorSpecies can specify min/max numeric constraints on gene values in three different ways.
base.min-gene
base.max-gene
Note: you must provide these values even if you don't use them, as they're used as defaults by #2 and #3 below.
base.num-segments The segments may be defined by either start or end indices of genes. This is controlled by specifying the value of:
base.segment-type which can assume the value of start or end, with start being the default. The indices are defined using Java array style, i.e. the first gene has the index of 0, and the last gene has the index of genome-size - 1.
Using this method, each segment is specified byj...
base.segment.j.start
base.segment.j.min-gene
base.segment.j.max-gene
if segment-type value was chosen as start or by:
base.segment.j.end
base.segment.j.min-gene
base.segment.j.max-gene
if segment-type value is equal to end.
base.min-gene.i
basn.max-gene.i
Any settings for #3 override #2, and both override #1.
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..num-segments int >= 1 (default=no segments used) |
(the number of gene segments defined) | |
base..segment-type int >= 1 (default=start) |
(defines the way in which segments are defined: either by providing start indices (segment-type=start) or by providing end indices (segment-type=end) | |
base..segment.j.start 0 <= int < genome length |
(the start index of gene segment j -- the end of a segment is before the start of the next segment) | (used when the value of segment-type parameter is equal to start) |
base..segment.j.end 0 <= int < genome length |
(the end of gene segment j -- the start of a segment is after the end of the previous segment) | (used when the value of segment-type parameter is equal to end) |
base..segment.j.min-gene double (default=0.0) |
(the minimum gene value for segment j) | |
base..segment.j.max-gene double >= base..segment.j.min-gene |
(the maximum gene value for segment j) | |
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[] |
gaussMutationStdevs
If null, we're not doing gaussian mutation I guess! |
double[] |
maxGenes
|
double[] |
minGenes
|
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_NUM_SEGMENTS
|
static java.lang.String |
P_OUTOFBOUNDS_RETRIES
|
static java.lang.String |
P_SEGMENT
|
static java.lang.String |
P_SEGMENT_END
|
static java.lang.String |
P_SEGMENT_START
|
static java.lang.String |
P_SEGMENT_TYPE
|
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_INTERMED_RECOMB, C_LINE_RECOMB, C_ONE_POINT, C_TWO_POINT, chunksize, crossoverProbability, crossoverType, genomeSize, lineDistance, mutationProbability, P_CHUNKSIZE, P_CROSSOVERPROB, P_CROSSOVERTYPE, P_GENOMESIZE, P_LINEDISTANCE, P_MUTATIONPROB, P_VECTORSPECIES, V_ANY_POINT, V_INTERMED_RECOMB, V_LINE_RECOMB, V_ONE_POINT, V_TWO_POINT, warned |
Fields inherited from class ec.Species |
---|
f_prototype, i_prototype, P_FITNESS, P_INDIVIDUAL, P_PIPE, pipe_prototype |
Constructor Summary | |
---|---|
FloatVectorSpecies()
|
Method Summary | |
---|---|
double |
gaussMutationStdev(int gene)
|
boolean |
inNumericalTypeRange(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, warnAboutGene |
Methods inherited from class ec.Species |
---|
clone, newIndividual, newIndividual |
Methods inherited from class java.lang.Object |
---|
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 static final java.lang.String P_NUM_SEGMENTS
public static final java.lang.String P_SEGMENT_TYPE
public static final java.lang.String P_SEGMENT_START
public static final java.lang.String P_SEGMENT_END
public static final java.lang.String P_SEGMENT
public double[] minGenes
public double[] maxGenes
public int mutationType
public double[] gaussMutationStdevs
public int outOfRangeRetries
Constructor Detail |
---|
public FloatVectorSpecies()
Method Detail |
---|
public void outOfRangeRetryLimitReached(EvolutionState state)
public double maxGene(int gene)
public double minGene(int gene)
public final double gaussMutationStdev(int gene)
public boolean inNumericalTypeRange(double geneVal)
public void setup(EvolutionState state, Parameter base)
Species
setup
in interface Prototype
setup
in interface Setup
setup
in class VectorSpecies
Prototype.setup(EvolutionState,Parameter)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |