ec.gp.koza
Class MCS

java.lang.Object
  extended by ec.BreedingSource
      extended by ec.BreedingPipeline
          extended by ec.gp.GPBreedingPipeline
              extended by ec.gp.koza.CrossoverPipeline
                  extended by ec.gp.koza.MCS
All Implemented Interfaces:
Prototype, Setup, SteadyStateBSourceForm, RandomChoiceChooser, java.io.Serializable, java.lang.Cloneable

public class MCS
extends CrossoverPipeline

See Also:
Serialized Form

Field Summary
 int minChildSize
           
static java.lang.String P_MIN_CHILD_SIZE
           
 
Fields inherited from class ec.gp.koza.CrossoverPipeline
INDS_PRODUCED, maxDepth, nodeselect1, nodeselect2, NUM_SOURCES, numTries, P_CROSSOVER, P_MAXDEPTH, P_NUM_TRIES, P_TOSS, parents, tossSecondParent, tree1, tree2
 
Fields inherited from class ec.gp.GPBreedingPipeline
P_NODESELECTOR, P_TREE, TREE_UNFIXED
 
Fields inherited from class ec.BreedingPipeline
DYNAMIC_SOURCES, mybase, P_NUMSOURCES, P_SOURCE, sources, V_SAME
 
Fields inherited from class ec.BreedingSource
CHECKBOUNDARY, DEFAULT_PRODUCED, NO_PROBABILITY, P_PROB, probability, UNUSED
 
Constructor Summary
MCS()
           
 
Method Summary
 void setup(EvolutionState state, Parameter base)
          Sets up the BreedingPipeline.
 boolean verifyPoints(GPInitializer initializer, GPNode inner1, GPNode inner2)
          Returns true if inner1 can feasibly be swapped into inner2's position.
 
Methods inherited from class ec.gp.koza.CrossoverPipeline
clone, defaultBase, numSources, produce, typicalIndsProduced
 
Methods inherited from class ec.gp.GPBreedingPipeline
produces
 
Methods inherited from class ec.BreedingPipeline
finishProducing, individualReplaced, maxChildProduction, minChildProduction, preparePipeline, prepareToProduce, sourcesAreProperForm
 
Methods inherited from class ec.BreedingSource
getProbability, pickRandom, setProbability, setupProbabilities
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

P_MIN_CHILD_SIZE

public static final java.lang.String P_MIN_CHILD_SIZE
See Also:
Constant Field Values

minChildSize

public int minChildSize
Constructor Detail

MCS

public MCS()
Method Detail

setup

public void setup(EvolutionState state,
                  Parameter base)
Description copied from class: BreedingSource
Sets up the BreedingPipeline. You can use state.output.error here because the top-level caller promises to call exitIfErrors() after calling setup. Note that probability might get modified again by an external source if it doesn't normalize right.

The most common modification is to normalize it with some other set of probabilities, then set all of them up in increasing summation; this allows the use of the fast static BreedingSource-picking utility method, BreedingSource.pickRandom(...). In order to use this method, for example, if four breeding source probabilities are {0.3, 0.2, 0.1, 0.4}, then they should get normalized and summed by the outside owners as: {0.3, 0.5, 0.6, 1.0}.

Specified by:
setup in interface Prototype
Specified by:
setup in interface Setup
Overrides:
setup in class CrossoverPipeline
See Also:
Prototype.setup(EvolutionState,Parameter)

verifyPoints

public boolean verifyPoints(GPInitializer initializer,
                            GPNode inner1,
                            GPNode inner2)
Description copied from class: CrossoverPipeline
Returns true if inner1 can feasibly be swapped into inner2's position.

Overrides:
verifyPoints in class CrossoverPipeline