|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--evSOLve.JEvolution.Chromosome | +--evSOLve.JEvolution.RealChromosome
Real number encoding with Evolution Strategy flavor. The bases (object parameters) are implemented as a Vector of Doubles with initial values ranging from 'lowReal' to 'highReal'. Mutation is implemented adding a random number drawn from a normal distribution N(0, sigma). There are two options for `sigma' (strategy parameter). Either there is a single standard deviation for all real bases, or a specific 'sigma' for each real base. The value(s) of `sigma' are mutated as well (self-adaptation). Recombination is a simple discrete scheme, selecting a base from either parent with probability 0.5 (uniform crossover).
Field Summary | |
protected double |
highReal
The largest real number for initialization. |
protected double |
lowReal
The lowest real number for initialization. |
protected java.util.Vector |
objectBases
The genetic information carrier for the object parameters. |
protected boolean |
singleSigma
The first parameter for mutation of strategy parameters. |
protected java.util.Vector |
strategyBases
The genetic information carrier for the strategy parameters. |
protected double |
tau
The second parameter for mutation of strategy parameters. |
protected double |
tauPrime
The first parameter for mutation of strategy parameters. |
Fields inherited from class evSOLve.JEvolution.Chromosome |
BIASED, crossoverPoints, crossoverRate, JA, LAPLACE, length, mutationRate, soupType, utils |
Constructor Summary | |
RealChromosome()
Creates a chromosome with 'lenght' bases, and default values for 'lowReal' (0.0) and 'highReal' (1.0), and 'mutationRate' (0.05). |
Method Summary | |
java.lang.Object |
clone()
A proper clone, cloning the bases deeply by creating new objects. |
protected void |
doCrossover(Chromosome father)
Discrete recombination of two random parents. |
protected void |
doMutation()
Mutate by adding normal noise with single or specific standard deviation (strategy parameters). |
boolean |
equals(java.lang.Object o)
An efficient check for equality. |
java.lang.Object |
getBases()
Return the genetic code for object parameters. |
double |
getHighReal()
Gives upper bound of initial real values. |
double |
getLowReal()
Gives lower bound of initial real values. |
boolean |
getStrategy()
Gives strategy type. |
java.lang.Object |
getStrategyBases()
Return the genetic code for strategy parameters. |
int |
hashCode()
An efficient hash code. |
void |
setHighReal(double highReal)
Changes upper bound of initial real values. |
void |
setLowReal(double lowReal)
Changes lower bound of initial real values. |
void |
setStrategy(boolean singleSigma)
Changes number of strategy parameters. |
java.lang.String |
toString()
Convert chromosome (object parameters) to string. |
Methods inherited from class evSOLve.JEvolution.Chromosome |
getCrossoverPoints, getCrossoverRate, getLength, getMutationRate, getSoupType, setCrossoverPoints, setCrossoverRate, setLength, setMutationRate, setSoupType |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.Vector objectBases
protected java.util.Vector strategyBases
protected double lowReal
protected double highReal
protected boolean singleSigma
protected double tauPrime
protected double tau
Constructor Detail |
public RealChromosome()
Method Detail |
public java.lang.Object clone()
clone
in class Chromosome
public boolean equals(java.lang.Object o)
equals
in class Chromosome
public int hashCode()
hashCode
in class Chromosome
protected void doMutation()
doMutation
in class Chromosome
protected void doCrossover(Chromosome father)
doCrossover
in class Chromosome
father
- A parent Chromosome.public double getLowReal()
public void setLowReal(double lowReal)
lowReal
- lower boundpublic double getHighReal()
public void setHighReal(double highReal)
highReal
- upper boundpublic void setStrategy(boolean singleSigma)
singleSigma
- single (true) sigma or for each object parameter (false)public boolean getStrategy()
public java.lang.Object getBases()
public java.lang.Object getStrategyBases()
public java.lang.String toString()
toString
in class Chromosome
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |