JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.evolvableDoubleList
Class CrossoverAdewaya

java.lang.Object
  extended bygov.nasa.javaGenes.core.ChildMaker
      extended bygov.nasa.javaGenes.evolvableDoubleList.ChildMaker
          extended bygov.nasa.javaGenes.evolvableDoubleList.CrossoverAdewaya
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class CrossoverAdewaya
extends ChildMaker

Implementation of Adewaya's MIT Master's Thesis "New Methods in Genetic Search with Real-Valued Chromosomes" 1996. Required three parents. One difference, we are looking for minimal fitness (Adewaya looked for maxima)

See Also:
Serialized Form

Field Summary
protected  double BAD_VALUE
           
protected  int maxLinearTries
           
 
Fields inherited from class gov.nasa.javaGenes.evolvableDoubleList.ChildMaker
selector
 
Fields inherited from class gov.nasa.javaGenes.core.ChildMaker
cumulative, forEvolution, last
 
Constructor Summary
CrossoverAdewaya()
           
CrossoverAdewaya(Selector selector)
           
CrossoverAdewaya(Selector selector, int maxLinearTries)
           
 
Method Summary
protected  double getLinearValue(double r, double best, double worst)
          best <= worst
protected  double getQuadraticMinimum(double[] fitness, EvolvableDoubleList[] evolvables, int index)
           
protected  boolean linearPart(EvolvableDoubleList child, double[] fitness, EvolvableDoubleList[] evolvables, Indices quadraticFailed)
           
 Evolvable[] makeChildren(Evolvable[] parents)
          Defaults to mutation, any subclass wanting more than one parent must over-ride.
 Evolvable[] makeChildren(Individual[] parents)
          only used when the variation operator need the fitness value
 int numberOfParents()
           
protected  void pickOnePart(EvolvableDoubleList child, EvolvableDoubleList[] evolvables, Indices quadraticFailed)
           
protected  Indices quadraticPart(EvolvableDoubleList child, double[] fitness, EvolvableDoubleList[] evolvables)
           
 java.lang.String toString()
           
 
Methods inherited from class gov.nasa.javaGenes.evolvableDoubleList.ChildMaker
getSelector
 
Methods inherited from class gov.nasa.javaGenes.core.ChildMaker
checkLastResults, checkResults, clearLast, getAndClearLastTabSeparatedResults, getFitnessFunctionNames, getLastTabSeparatedResults, headerFragment, mutate, neverUsed, proportionDown, results, setFitnessFunction, setFitnessFunctionNames, subClassMeasures, tabSeparatedResults
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BAD_VALUE

protected final double BAD_VALUE
See Also:
Constant Field Values

maxLinearTries

protected int maxLinearTries
Constructor Detail

CrossoverAdewaya

public CrossoverAdewaya()

CrossoverAdewaya

public CrossoverAdewaya(Selector selector)

CrossoverAdewaya

public CrossoverAdewaya(Selector selector,
                        int maxLinearTries)
Method Detail

numberOfParents

public int numberOfParents()
Overrides:
numberOfParents in class ChildMaker
Returns:
the number of parents makeChildren expects. I.e., the length of the array passed to makeChildren. If not implemented by subclass, defaults to 1 (mutation).

makeChildren

public Evolvable[] makeChildren(Evolvable[] parents)
Description copied from class: ChildMaker
Defaults to mutation, any subclass wanting more than one parent must over-ride. Mutators can over-ride mutate(Evovlable)

Overrides:
makeChildren in class ChildMaker
Parameters:
parents - the evolvables from which children will be created. By convention, the parents are not modified.
Returns:
the children created. Subclass must implement copyForEvolution()

makeChildren

public Evolvable[] makeChildren(Individual[] parents)
Description copied from class: ChildMaker
only used when the variation operator need the fitness value

Overrides:
makeChildren in class ChildMaker

quadraticPart

protected Indices quadraticPart(EvolvableDoubleList child,
                                double[] fitness,
                                EvolvableDoubleList[] evolvables)

getQuadraticMinimum

protected double getQuadraticMinimum(double[] fitness,
                                     EvolvableDoubleList[] evolvables,
                                     int index)

linearPart

protected boolean linearPart(EvolvableDoubleList child,
                             double[] fitness,
                             EvolvableDoubleList[] evolvables,
                             Indices quadraticFailed)
Parameters:
child - is modified if successful
Returns:
true if linear assignment succeeds

getLinearValue

protected double getLinearValue(double r,
                                double best,
                                double worst)
best <= worst


pickOnePart

protected void pickOnePart(EvolvableDoubleList child,
                           EvolvableDoubleList[] evolvables,
                           Indices quadraticFailed)
Parameters:
child - is modified

toString

public java.lang.String toString()
Overrides:
toString in class ChildMaker

JavaGenes, NASA Ames. Written largely by Al Globus